-
Notifications
You must be signed in to change notification settings - Fork 901
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
Address inconsistency in single quote normalization in JSON reader #15324
Address inconsistency in single quote normalization in JSON reader #15324
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems fine to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Just two optional nitpicks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with @elstehle 's suggestions, otherwise looks great.
Love the test name changes! 👍
…hi/cudf into json-single-quote-normalization-fix
/merge |
Description
This PR addresses the inconsistency in processing single quotes within a quoted string in the single quote normalizer.
In the current implementation, when we have an escaped single quote within a single quoted string, the normalizer removes the backslash escape on converting the string to double quotes. However, the normalizer retains the contents of double quoted strings as-is i.e. if there are escaped single quotes within a double quoted string, the backslash character is retained in the output.
We address this inconsistency by removing the escape character for single quotes in all double quoted string in the output.
Tackles #15303 to mimic Spark behavior.
Checklist