-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-25040][SQL][FOLLOWUP] Add legacy config for allowing empty strings for certain types in json parser #27456
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
Conversation
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JacksonParser.scala
Outdated
Show resolved
Hide resolved
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JacksonParser.scala
Outdated
Show resolved
Hide resolved
|
Thanks @MaxGekk! |
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
Outdated
Show resolved
Hide resolved
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/json/JsonSuite.scala
Show resolved
Hide resolved
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JacksonParser.scala
Outdated
Show resolved
Hide resolved
dongjoon-hyun
left a comment
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.
Thank you, @viirya . +1, LGTM (with a few minor comments.)
cc @gatorsmile
|
Test build #117852 has finished for PR 27456 at commit
|
|
Test build #117854 has finished for PR 27456 at commit
|
|
Test build #117857 has finished for PR 27456 at commit
|
|
Ur, it's interesting. |
|
The master branch seems to be okay.
BTW, the error is irrelevant to this PR. |
|
@dongjoon-hyun, I think Shane upgraded testthat to 2.0.0 and this seems causing this new problem. Let me try to take a quick stab. |
|
@shaneknapp, can you take a look? Seems it's a package installation issue. Looks like Some other tests looks related to environment variables: |
|
Thank you so much, @HyukjinKwon ! |
|
It seems that only PRBuilder is affected so far. Then, I'll merge this PR. |
…ings for certain types in json parser ### What changes were proposed in this pull request? This is a follow-up for #22787. In #22787 we disallowed empty strings for json parser except for string and binary types. This follow-up adds a legacy config for restoring previous behavior of allowing empty string. ### Why are the changes needed? Adding a legacy config to make migration easy for Spark users. ### Does this PR introduce any user-facing change? Yes. If set this legacy config to true, the users can restore previous behavior prior to Spark 3.0.0. ### How was this patch tested? Unit test. Closes #27456 from viirya/SPARK-25040-followup. Lead-authored-by: Liang-Chi Hsieh <[email protected]> Co-authored-by: Liang-Chi Hsieh <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]> (cherry picked from commit 7631275) Signed-off-by: Dongjoon Hyun <[email protected]>
|
+1 for the decision. Let me take an action for the tests for now. |
|
Thanks all! |
|
Made a PR at #27460 |
What changes were proposed in this pull request?
This is a follow-up for #22787. In #22787 we disallowed empty strings for json parser except for string and binary types. This follow-up adds a legacy config for restoring previous behavior of allowing empty string.
Why are the changes needed?
Adding a legacy config to make migration easy for Spark users.
Does this PR introduce any user-facing change?
Yes. If set this legacy config to true, the users can restore previous behavior prior to Spark 3.0.0.
How was this patch tested?
Unit test.