-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-30166][SQL] Eliminate compilation warnings in JSONOptions #26797
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
HyukjinKwon
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.
Seems fine if tests pass.
srowen
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.
This kind of change is fine in general. My worry is just how well it might work if Jackson is downgraded, but, only so much we can worry about this. If it passes vs current profiles, OK.
|
Test build #114992 has finished for PR 26797 at commit
|
This won't work on previous Jackson versions. We have to revert the changes if we need to downgrade Jackson. We could point out this PR in #26131 to make the downgrade easier. |
|
Hm, that's actually a good point because Jackson version is often downgraded. |
|
Let me leave it to @srowen. |
|
I've kind of lost track of whether deploying on Hadoop 2.7 means it downgrades at runtime somehow, because Hadoop 2.x uses an older version. It evidently doesn't cause test failures at least. I really don't have a specific case for you why it won't work, but just know this has been troublesome in the past and so I just haven't touched Jackson if not necessary. @steveloughran , eh, any thoughts on the state of Jackson in Hadoop? |
|
@srowen If such problem exists, maybe it makes sense to shade Jackson 2.10 and use the shaded version in JSON datasource? |
|
It probably does make sense to shade, to isolate whatever Spark uses Jackson for a little further. I might not make this change right now otherwise, by itself, purely out of my general fear of these issues. That said ... I feel like we have already made some Jackson changes that probably break compatibility with 2.6. |
|
Retest this please. |
|
Test build #115265 has finished for PR 26797 at commit
|
Probably. I don't know is there any test which checks compatibility with Jackson v2.6. If not, rejecting PRs like this will not safe us from breaking compatibility. Also it would nice to understand why do we really need the compatibility. As far as I know Jackson v3 is going to drop the deprecated classes and functions replaced by this PR. Are we going to stuck on v2.x forever? |
|
I'm OK with merging it as I don't think this by itself breaks anything additional. If we find it doesn't work with Hadoop 2.x or something, well, we can evaluate what has to give -- just how it is, or we need to revert more than this. that said I am pretty confident we need to be able to update Jackson for security reasons, well beyond 2.6.x. |
|
Merged to master |
a mess. We need to strip out use of jackson marshalling as that's where the security issues always surface; its not been great for backwards compat. Not sure what branch-2 latest is up to. we are planning a 2.10 release (last of the branch-2's)...now is time to get your jackson version needs catered for |
What changes were proposed in this pull request?
In the PR, I propose to replace
setJacksonOptions()inJSONOptionsbybuildJsonFactory()which buildsJsonFactoryusingJsonFactoryBuilder. This allows to avoid using deprecated feature configurations fromJsonParser.Feature.Why are the changes needed?
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JSONOptions.scala:setJacksonOptionsin the future.Does this PR introduce any user-facing change?
No
How was this patch tested?
By
JsonSuite,JsonFunctionsSuite,JsonExpressionsSuite.