[SPARK-42307][SQL] Assign name for error _LEGACY_ERROR_TEMP_2232#47354
[SPARK-42307][SQL] Assign name for error _LEGACY_ERROR_TEMP_2232#47354junyuc25 wants to merge 8 commits intoapache:masterfrom
Conversation
|
Hi @MaxGekk , I propose a PR to update the name for legacy errors. Do you mind taking a look? Thanks. |
There was a problem hiding this comment.
nit:
| test("SPARK-42307 - Trying to get the value from a null column should result in error") { | |
| test("SPARK-42307: get the value from a null column should result in error") { |
There was a problem hiding this comment.
Thanks for the comment @allisonwang-db. I updated the test description.
There was a problem hiding this comment.
My bad I clicked the revoke review by mistake...
There was a problem hiding this comment.
cc @allisonwang-db @cloud-fan @MaxGekk. Not sure if you got a chance to review this small PR? Thanks!
There was a problem hiding this comment.
| test("SPARK-42307 - get the value from a null column should result in error") { | |
| test("SPARK-42307: get a value from a null column should result in error") { |
There was a problem hiding this comment.
Let's name in more precise way:
| "COLUMN_VALUE_IS_NULL" : { | |
| "ROW_VALUE_IS_NULL" : { |
There was a problem hiding this comment.
| "Value at index <index> is null." | |
| Found NULL in a row at the index <index>, expected a non-NULL value. |
MaxGekk
left a comment
There was a problem hiding this comment.
... name _LEGACY_ERROR_TEMP_2232 with COLUMN_VALUE_IS_NULL
Could you update PR's description according to your changes, please.
There was a problem hiding this comment.
Could you clarify why did you remove it instead of replacing NullPointerException by SparkException, just wonder.
There was a problem hiding this comment.
Oops I misunderstood your previous comment. Replaced NPE with SparkException.
There was a problem hiding this comment.
And one more thing is need to update the SQL migration guide because this might impact user apps and potentially break them. Please, add an item to sql-migration-guide.md.
|
Hi @MaxGekk , looks like the current implementation is causing an error when generating docs (job link), because SparkException is declared in the comment but it is not thrown from the codes. I found two options to fix this:
I kind of lean towards option #1 as it could provide users with better context about the exception type being thrown, although they would have to handle this exception explicitly in their codes. Let me know your thought on this or if you have other ideas. Thanks :)! |
|
@junyuc25 I guess a runtime exception might not force catching the exception. How about to replace |
|
+1, LGTM. Merging to master. |
|
@junyuc25 Do you have an account at the OSS JIRA? If so, leave a comment in SPARK-42307. I will assign the ticket to you. |
|
Yes I posted a comment in the Jira ticket. Thanks for reviewing!
Sent from Gmail Mobile
Maxim Gekk ***@***.***>于2024年8月14日 周三01:18写道:
… @junyuc25 <https://github.com/junyuc25> Do you have an account at the OSS
JIRA? If so, leave a comment in SPARK-42307
<https://issues.apache.org/jira/browse/SPARK-42307>. I will assign the
ticket to you.
—
Reply to this email directly, view it on GitHub
<#47354 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACS35K5D7DRJXJYHMO7KYV3ZRI5U3AVCNFSM6AAAAABK4I2EH2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBWG42DEMJQGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
What changes were proposed in this pull request?
In this PR, I propose to replace the legacy error name
_LEGACY_ERROR_TEMP_2232withROW_VALUE_IS_NULL, and add a test case for it.Why are the changes needed?
Proper name improves user experience with Spark SQL.
Does this PR introduce any user-facing change?
Yes.
How was this patch tested?
Ran all the tests in the suite:
Was this patch authored or co-authored using generative AI tooling?
No