Uh oh!
There was an error while loading. Please reload this page.
[SPARK-30166][SQL] Eliminate compilation warnings in JSONOptions - #26797
[SPARK-30166][SQL] Eliminate compilation warnings in JSONOptions#26797MaxGekk wants to merge 1 commit into
Conversation
srowen
left a comment
There was a problem hiding this comment.
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.
SparkQA
commented
Dec 8, 2019
Test build #114992 has finished for PR 26797 at commit
|
MaxGekk
commented
Dec 8, 2019
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. |
HyukjinKwon
commented
Dec 9, 2019
Hm, that's actually a good point because Jackson version is often downgraded. |
HyukjinKwon
commented
Dec 9, 2019
Let me leave it to @srowen. |
srowen
commented
Dec 9, 2019
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? |
MaxGekk
commented
Dec 9, 2019
@srowen If such problem exists, maybe it makes sense to shade Jackson 2.10 and use the shaded version in JSON datasource? |
srowen
commented
Dec 9, 2019
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. |
dongjoon-hyun
commented
Dec 12, 2019
Retest this please. |
SparkQA
commented
Dec 13, 2019
Test build #115265 has finished for PR 26797 at commit
|
MaxGekk
commented
Dec 13, 2019
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? |
srowen
commented
Dec 13, 2019
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. |
srowen
commented
Dec 15, 2019
Merged to master |
steveloughran
commented
Dec 16, 2019
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.