Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Hive CSV escape character to backslash when set to double quote #18952

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

dain
Copy link
Member

@dain dain commented Sep 7, 2023

Description

Hive has a bug that changes the escape character to backslash when it is explicitly set to a double quote during deserialization. The native CSV reader is a bug for bug compatible reimplementation of the Hive OpenCSV reader, so this behavior must be replicated.

Fixes #18918

Release notes

(X) Release notes are required, with the following suggested text:

# Section
* Fix incompatibility with Hive OpenCSV deserialization.  When escape character is explicitly set to double quote, a backslash must be used instead. ({issue}`18918`)

@dain dain requested a review from electrum September 7, 2023 00:14
@cla-bot cla-bot bot added the cla-signed label Sep 7, 2023
Hive has a bug that changes the escape character to backslash when it is
explicitly set to a double quote during deserialization.  The native CSV
reader is a bug for bug compatible reimplementation of the Hive OpenCSV
reader, so this behavior must be replicated.
@dain dain merged commit 006097f into trinodb:master Sep 7, 2023
@dain dain deleted the fix-csv branch September 7, 2023 23:16
@github-actions github-actions bot added this to the 427 milestone Sep 7, 2023
@colebow
Copy link
Member

colebow commented Sep 12, 2023

I'm very amused by the prospect of having to intentionally add a bug in for compatibility purposes. I totally get it, it's just a funny principle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Behavior difference between OpenCSV native implementation and hive serde
3 participants