-
Notifications
You must be signed in to change notification settings - Fork 236
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
Support reading JSON data with single quotes around attribute names and values #10273
Conversation
Signed-off-by: Andy Grove <[email protected]>
build |
sql-plugin/src/main/scala/org/apache/spark/sql/rapids/GpuJsonToStructs.scala
Show resolved
Hide resolved
build |
build failing due to #10291 |
build |
… into json-single-quote
build |
@@ -599,7 +599,7 @@ def test_from_json_map_fallback(): | |||
@allow_non_gpu(*non_utc_allow) | |||
def test_from_json_struct(schema): | |||
# note that column 'a' does not use leading zeroes due to https://github.com/NVIDIA/spark-rapids/issues/9588 | |||
json_string_gen = StringGen(r'{"a": [1-9]{0,5}, "b": "[A-Z]{0,5}", "c": 1\d\d\d}') \ | |||
json_string_gen = StringGen(r'{\'a\': [1-9]{0,5}, "b": \'[A-Z]{0,5}\', "c": 1\d\d\d}') \ |
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.
nit: could use fewer escape sequences with triple quotes
json_string_gen = StringGen(r'{\'a\': [1-9]{0,5}, "b": \'[A-Z]{0,5}\', "c": 1\d\d\d}') \ | |
json_string_gen = StringGen(r'''{'a': [1-9]{0,5}, "b": '[A-Z]{0,5}', "c": 1\d\d\d}''') \ |
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.
Makes sense. I will address this in a follow-up PR if that is ok since we need this to make it into the 24.02 release.
Closes #10270
Depends on rapidsai/cudf#14729