-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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
[SPARK-46810][DOCS] Align error class terminology with SQL standard #44902
[SPARK-46810][DOCS] Align error class terminology with SQL standard #44902
Conversation
@MaxGekk - Given the recent discussion on SPARK-46810, shall I expand this PR to include renaming |
Let's do that in a separate PR because I expect massive changes. It should be easier to review only one kind of changes. |
I've created SPARK-47429 to track renaming The build is passing, and this is ready for review, @MaxGekk. |
Since |
@MaxGekk - Is there something I can do to move this along? Once this is merged in, I am happy to work on SPARK-47429, as I noted in the comments there. (But it's also fine if you'd prefer to work on it yourself.) |
@nchammas Not sure if we can count on a response from @MaxGekk right now. @cloud-fan How can we proceed here? |
The JSON field still has |
I was planning to change that as part of SPARK-47429, since that affects the internal API and will likely require a large diff. If you agree with that, I will update the description for SPARK-47429 accordingly. |
oh, sounds good to do it later. Let's rebase this PR and then merge it ASAP. |
@cloud-fan - Ready for review. |
thanks, merging to master! |
|
||
Fixing this will require renaming `SparkException.errorClass` to `SparkException.errorCondition` and making similar changes to `ErrorClassesJsonReader` and other parts of the codebase. We will address this in [SPARK-47429]. Until that is complete, we will have to live with the fact that a string like `DATATYPE_MISSING_SIZE` is called an "error condition" in our user-facing documentation but an "error class" in the code. | ||
|
||
For more details, please see [SPARK-46810][SPARK-46810]. |
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.
Why do we need to write [SPARK-46810]
twice here? Is it because of the special syntax for markdown
? Or do we actually want to write: [SPARK-46810]
[SPARK-47429]
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.
Nope, I meant to link to SPARK-46810. The first [SPARK-46810]
is the text I want to link, and the second [SPARK-46810]
is the reference to the link URL I have defined just below in the same document:
[SPARK-46810]: https://issues.apache.org/jira/browse/SPARK-46810
### What changes were proposed in this pull request? The pr is following up #44902, to make some `reference files links` clickable. ### Why are the changes needed? Convenient for developers to navigate directly when read this file `README.md`. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Manually test. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #46105 from panbingkun/SPARK-46810_FOLLOWUP. Authored-by: panbingkun <panbingkun@baidu.com> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
…kError()` ### What changes were proposed in this pull request? In the PR, I propose to rename the `errorClass` parameter of the `checkError()` functions (and related and similar functions) to `condition` to follow the naming convention introduced by SPARK-46810. For example: ```scala checkError( exception = e, condition = "UNRESOLVED_COLUMN.WITH_SUGGESTION", parameters = Map("objectName" -> "`non_exist`", "proposal" -> "`i`, `j`")) ``` ### Why are the changes needed? To follow new naming convention introduced by #44902. ### Does this PR introduce _any_ user-facing change? No, the changes affect **only in tests**. ### How was this patch tested? By running the existing test suites and GAs. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #48027 from MaxGekk/rename-checkError-condition. Authored-by: Max Gekk <max.gekk@gmail.com> Signed-off-by: Max Gekk <max.gekk@gmail.com>
…kError()` ### What changes were proposed in this pull request? In the PR, I propose to rename the `errorClass` parameter of the `checkError()` functions (and related and similar functions) to `condition` to follow the naming convention introduced by SPARK-46810. For example: ```scala checkError( exception = e, condition = "UNRESOLVED_COLUMN.WITH_SUGGESTION", parameters = Map("objectName" -> "`non_exist`", "proposal" -> "`i`, `j`")) ``` ### Why are the changes needed? To follow new naming convention introduced by apache#44902. ### Does this PR introduce _any_ user-facing change? No, the changes affect **only in tests**. ### How was this patch tested? By running the existing test suites and GAs. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#48027 from MaxGekk/rename-checkError-condition. Authored-by: Max Gekk <max.gekk@gmail.com> Signed-off-by: Max Gekk <max.gekk@gmail.com>
…kError()` ### What changes were proposed in this pull request? In the PR, I propose to rename the `errorClass` parameter of the `checkError()` functions (and related and similar functions) to `condition` to follow the naming convention introduced by SPARK-46810. For example: ```scala checkError( exception = e, condition = "UNRESOLVED_COLUMN.WITH_SUGGESTION", parameters = Map("objectName" -> "`non_exist`", "proposal" -> "`i`, `j`")) ``` ### Why are the changes needed? To follow new naming convention introduced by apache#44902. ### Does this PR introduce _any_ user-facing change? No, the changes affect **only in tests**. ### How was this patch tested? By running the existing test suites and GAs. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#48027 from MaxGekk/rename-checkError-condition. Authored-by: Max Gekk <max.gekk@gmail.com> Signed-off-by: Max Gekk <max.gekk@gmail.com>
…kError()` ### What changes were proposed in this pull request? In the PR, I propose to rename the `errorClass` parameter of the `checkError()` functions (and related and similar functions) to `condition` to follow the naming convention introduced by SPARK-46810. For example: ```scala checkError( exception = e, condition = "UNRESOLVED_COLUMN.WITH_SUGGESTION", parameters = Map("objectName" -> "`non_exist`", "proposal" -> "`i`, `j`")) ``` ### Why are the changes needed? To follow new naming convention introduced by apache#44902. ### Does this PR introduce _any_ user-facing change? No, the changes affect **only in tests**. ### How was this patch tested? By running the existing test suites and GAs. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#48027 from MaxGekk/rename-checkError-condition. Authored-by: Max Gekk <max.gekk@gmail.com> Signed-off-by: Max Gekk <max.gekk@gmail.com>
What changes were proposed in this pull request?
error-classes.json
toerror-conditions.json
and update the codebase accordingly.error-categories.json
toerror-classes.json
and update the codebase accordingly.Why are the changes needed?
We should use error class terminology consistently and unambiguously, and we should stick as closely to the SQL standard as possible.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Existing unit tests.
Was this patch authored or co-authored using generative AI tooling?
No.