[SPARK-46971][SQL] When the compression is null, a NullPointException should not be thrown#45015
Closed
panbingkun wants to merge 2 commits intoapache:masterfrom
Closed
[SPARK-46971][SQL] When the compression is null, a NullPointException should not be thrown#45015panbingkun wants to merge 2 commits intoapache:masterfrom
compression is null, a NullPointException should not be thrown#45015panbingkun wants to merge 2 commits intoapache:masterfrom
Conversation
…ion` should not be thrown
…ion` should not be thrown
HyukjinKwon
reviewed
Feb 5, 2024
| val compression: String = { | ||
| parameters.get(COMPRESSION).getOrElse(SQLConf.get.avroCompressionCodec) | ||
| val v = parameters.get(COMPRESSION).getOrElse(SQLConf.get.avroCompressionCodec) | ||
| if (v == null) { |
Member
There was a problem hiding this comment.
This problem is actually here and there, not only AvroOptions. I believe a lot of CSVOptions also has this problem.
Contributor
There was a problem hiding this comment.
Would there be compatibility issues if null values are prohibited in CaseInsensitiveMap?
|
We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
The pr aims to provide better prompts when option's
compressionis null.Why are the changes needed?
In the original logic, if the
compressionis null, Spark will throw aNullPointerException, which is obviously unfriendly to the user.Before:
After:
Does this PR introduce any user-facing change?
Yes, when
compressionis null, will display better error prompts.How was this patch tested?
Was this patch authored or co-authored using generative AI tooling?
No.