You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/10/06 02:22:05 UTC

[GitHub] [spark] dchvn opened a new pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

dchvn opened a new pull request #34190:
URL: https://github.com/apache/spark/pull/34190


   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
     7. If you want to add a new configuration, please read the guideline first for naming configurations in
        'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
     8. If you want to add or modify an error type or message, please read the guideline first in
        'core/src/main/resources/error/README.md'.
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   Refactor some exceptions in QueryExecutionErrors to use error classes.
   There are currently ~350 exceptions in this file; so this PR only focuses on the fourth set of 20.
   
   > unableToCreateDatabaseAsFailedToCreateDirectoryError
   > unableToDropDatabaseAsFailedToDeleteDirectoryError
   > unableToCreateTableAsFailedToCreateDirectoryError
   > unableToDeletePartitionPathError
   > unableToDropTableAsFailedToDeleteDirectoryError
   > unableToRenameTableAsFailedToRenameDirectoryError
   > unableToCreatePartitionPathError
   > unableToRenamePartitionPathError
   > methodNotImplementedError
   > tableStatsNotSpecifiedError
   > unaryMinusCauseOverflowError
   > binaryArithmeticCauseOverflowError
   > failedSplitSubExpressionMsg
   > failedSplitSubExpressionError
   > failedToCompileMsg
   > internalCompilerError
   > compilerError
   > unsupportedTableChangeError
   > notADatasourceRDDPartitionError
   > dataPathNotSpecifiedError
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   https://issues.apache.org/jira/browse/SPARK-36094
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   No
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   -->
   Pass all current tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-937822454






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-935510082


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143865/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-937676584


   **[Test build #143965 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143965/testReport)** for PR 34190 at commit [`9be6ab3`](https://github.com/apache/spark/commit/9be6ab38e2a71c36049c25d7754273f52de46769).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-937921924


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48456/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-937886337


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143973/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dchvn commented on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
dchvn commented on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-937911229


   CC @karenfeng, please help me review this one, many thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-937869015


   **[Test build #143965 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143965/testReport)** for PR 34190 at commit [`9be6ab3`](https://github.com/apache/spark/commit/9be6ab38e2a71c36049c25d7754273f52de46769).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-935305430


   **[Test build #143865 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143865/testReport)** for PR 34190 at commit [`98ba4b9`](https://github.com/apache/spark/commit/98ba4b9d47caabafc910a5c39f8d8b7e0eb7c03b).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-935510082


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143865/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-937921924


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48456/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-937871482


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143965/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-937676584






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-937822454


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143988/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-935305430


   **[Test build #143865 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143865/testReport)** for PR 34190 at commit [`98ba4b9`](https://github.com/apache/spark/commit/98ba4b9d47caabafc910a5c39f8d8b7e0eb7c03b).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-937889034


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48456/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] github-actions[bot] commented on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-1018984607


   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.
   If you'd like to revive this PR, please reopen it and ask a committer to remove the Stale tag!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-937871482


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143965/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-937676584






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dchvn commented on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
dchvn commented on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-937911229


   CC @karenfeng, please help me review this one, many thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-937721523


   **[Test build #143973 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143973/testReport)** for PR 34190 at commit [`98ba4b9`](https://github.com/apache/spark/commit/98ba4b9d47caabafc910a5c39f8d8b7e0eb7c03b).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-935480713


   **[Test build #143865 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143865/testReport)** for PR 34190 at commit [`98ba4b9`](https://github.com/apache/spark/commit/98ba4b9d47caabafc910a5c39f8d8b7e0eb7c03b).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-937883328


   **[Test build #143973 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143973/testReport)** for PR 34190 at commit [`98ba4b9`](https://github.com/apache/spark/commit/98ba4b9d47caabafc910a5c39f8d8b7e0eb7c03b).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-937822454


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143988/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-937822454






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-937676584


   **[Test build #143965 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143965/testReport)** for PR 34190 at commit [`9be6ab3`](https://github.com/apache/spark/commit/9be6ab38e2a71c36049c25d7754273f52de46769).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-935438469


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48378/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-935415805


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48378/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-935438469


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48378/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-937826877


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48456/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-937760280


   **[Test build #143988 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143988/testReport)** for PR 34190 at commit [`9be6ab3`](https://github.com/apache/spark/commit/9be6ab38e2a71c36049c25d7754273f52de46769).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-935351365


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48378/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] karenfeng commented on a change in pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
karenfeng commented on a change in pull request #34190:
URL: https://github.com/apache/spark/pull/34190#discussion_r728480745



##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -11,17 +15,51 @@
     "message" : [ "%s cannot be represented as Decimal(%s, %s)." ],
     "sqlState" : "22005"
   },
+  "CANNOT_CREATE_OBJECT_DUE_TO_FAILED_DIRECTORY_CREATION" : {
+    "message" : [ "Unable to CREATE %s %s as failed to create its directory %s." ]
+  },
+  "CANNOT_CREATE_PARTITION_PATH" : {
+    "message" : [ "Unable to create partition path %s" ]
+  },
+  "CANNOT_DELETE_PARTITION_PATH" : {
+    "message" : [ "Unable to delete partition path %s" ]
+  },
+  "CANNOT_DROP_OBJECT_DUE_TO_FAILED_DIRECTORY_DELETION" : {
+    "message" : [ "Unable to DROP %s %s as failed to delete its directory %s." ]
+  },
+  "CANNOT_EVALUATE_EXPRESSION" : {

Review comment:
       These aren't from this PR, right?

##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala
##########
@@ -344,94 +345,139 @@ object QueryExecutionErrors {
 
   def unableToCreateDatabaseAsFailedToCreateDirectoryError(
       dbDefinition: CatalogDatabase, e: IOException): Throwable = {
-    new SparkException(s"Unable to create database ${dbDefinition.name} as failed " +
-      s"to create its directory ${dbDefinition.locationUri}", e)
+    new SparkException(
+      errorClass = "CANNOT_CREATE_OBJECT_DUE_TO_FAILED_DIRECTORY_CREATION",
+      messageParameters = Array("DATABASE", dbDefinition.name, dbDefinition.locationUri.toString),
+      cause = e)
   }
 
   def unableToDropDatabaseAsFailedToDeleteDirectoryError(
       dbDefinition: CatalogDatabase, e: IOException): Throwable = {
-    new SparkException(s"Unable to drop database ${dbDefinition.name} as failed " +
-      s"to delete its directory ${dbDefinition.locationUri}", e)
+    new SparkException(
+      errorClass = "CANNOT_DROP_OBJECT_DUE_TO_FAILED_DIRECTORY_DELETION",
+      messageParameters = Array("DATABASE", dbDefinition.name, dbDefinition.locationUri.toString),
+      cause = e)
   }
 
   def unableToCreateTableAsFailedToCreateDirectoryError(
       table: String, defaultTableLocation: Path, e: IOException): Throwable = {
-    new SparkException(s"Unable to create table $table as failed " +
-      s"to create its directory $defaultTableLocation", e)
+    new SparkException(
+      errorClass = "CANNOT_CREATE_OBJECT_DUE_TO_FAILED_DIRECTORY_CREATION",
+      messageParameters = Array("TABLE", table, defaultTableLocation.toString),
+      cause = e)
   }
 
   def unableToDeletePartitionPathError(partitionPath: Path, e: IOException): Throwable = {
-    new SparkException(s"Unable to delete partition path $partitionPath", e)
+    new SparkException(
+      errorClass = "CANNOT_DELETE_PARTITION_PATH",
+      messageParameters = Array(partitionPath.toString),
+      cause = e)
   }
 
   def unableToDropTableAsFailedToDeleteDirectoryError(
       table: String, dir: Path, e: IOException): Throwable = {
-    new SparkException(s"Unable to drop table $table as failed " +
-      s"to delete its directory $dir", e)
+    new SparkException(
+      errorClass = "CANNOT_DROP_OBJECT_DUE_TO_FAILED_DIRECTORY_DELETION",
+      messageParameters = Array("TABLE", table, dir.toString),
+      cause = e)
   }
 
   def unableToRenameTableAsFailedToRenameDirectoryError(
       oldName: String, newName: String, oldDir: Path, e: IOException): Throwable = {
-    new SparkException(s"Unable to rename table $oldName to $newName as failed " +
-      s"to rename its directory $oldDir", e)
+    new SparkException(
+      errorClass = "CANNOT_RENAME_TABLE_DUE_TO_FAILED_DIRECTORY_RENAMING",
+      messageParameters = Array(oldName, newName, oldDir.toString),
+      cause = e)
   }
 
   def unableToCreatePartitionPathError(partitionPath: Path, e: IOException): Throwable = {
-    new SparkException(s"Unable to create partition path $partitionPath", e)
+    new SparkException(
+      errorClass = "CANNOT_CREATE_PARTITION_PATH",
+      messageParameters = Array(partitionPath.toString),
+      cause = e)
   }
 
   def unableToRenamePartitionPathError(oldPartPath: Path, e: IOException): Throwable = {
-    new SparkException(s"Unable to rename partition path $oldPartPath", e)
+    new SparkException(
+      errorClass = "CANNOT_RENAME_PARTITION_PATH",
+      messageParameters = Array(oldPartPath.toString),
+      cause = e)
   }
 
   def methodNotImplementedError(methodName: String): Throwable = {
-    new UnsupportedOperationException(s"$methodName is not implemented")
+    new SparkUnsupportedOperationException(

Review comment:
       It looks like this is actually only used by a dummy implementation and should not be exposed to users. Can you make this an internal error?

##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala
##########
@@ -344,94 +345,139 @@ object QueryExecutionErrors {
 
   def unableToCreateDatabaseAsFailedToCreateDirectoryError(
       dbDefinition: CatalogDatabase, e: IOException): Throwable = {
-    new SparkException(s"Unable to create database ${dbDefinition.name} as failed " +
-      s"to create its directory ${dbDefinition.locationUri}", e)
+    new SparkException(
+      errorClass = "CANNOT_CREATE_OBJECT_DUE_TO_FAILED_DIRECTORY_CREATION",
+      messageParameters = Array("DATABASE", dbDefinition.name, dbDefinition.locationUri.toString),
+      cause = e)
   }
 
   def unableToDropDatabaseAsFailedToDeleteDirectoryError(
       dbDefinition: CatalogDatabase, e: IOException): Throwable = {
-    new SparkException(s"Unable to drop database ${dbDefinition.name} as failed " +
-      s"to delete its directory ${dbDefinition.locationUri}", e)
+    new SparkException(
+      errorClass = "CANNOT_DROP_OBJECT_DUE_TO_FAILED_DIRECTORY_DELETION",
+      messageParameters = Array("DATABASE", dbDefinition.name, dbDefinition.locationUri.toString),
+      cause = e)
   }
 
   def unableToCreateTableAsFailedToCreateDirectoryError(
       table: String, defaultTableLocation: Path, e: IOException): Throwable = {
-    new SparkException(s"Unable to create table $table as failed " +
-      s"to create its directory $defaultTableLocation", e)
+    new SparkException(
+      errorClass = "CANNOT_CREATE_OBJECT_DUE_TO_FAILED_DIRECTORY_CREATION",
+      messageParameters = Array("TABLE", table, defaultTableLocation.toString),
+      cause = e)
   }
 
   def unableToDeletePartitionPathError(partitionPath: Path, e: IOException): Throwable = {
-    new SparkException(s"Unable to delete partition path $partitionPath", e)
+    new SparkException(
+      errorClass = "CANNOT_DELETE_PARTITION_PATH",
+      messageParameters = Array(partitionPath.toString),
+      cause = e)
   }
 
   def unableToDropTableAsFailedToDeleteDirectoryError(
       table: String, dir: Path, e: IOException): Throwable = {
-    new SparkException(s"Unable to drop table $table as failed " +
-      s"to delete its directory $dir", e)
+    new SparkException(
+      errorClass = "CANNOT_DROP_OBJECT_DUE_TO_FAILED_DIRECTORY_DELETION",
+      messageParameters = Array("TABLE", table, dir.toString),
+      cause = e)
   }
 
   def unableToRenameTableAsFailedToRenameDirectoryError(
       oldName: String, newName: String, oldDir: Path, e: IOException): Throwable = {
-    new SparkException(s"Unable to rename table $oldName to $newName as failed " +
-      s"to rename its directory $oldDir", e)
+    new SparkException(
+      errorClass = "CANNOT_RENAME_TABLE_DUE_TO_FAILED_DIRECTORY_RENAMING",
+      messageParameters = Array(oldName, newName, oldDir.toString),
+      cause = e)
   }
 
   def unableToCreatePartitionPathError(partitionPath: Path, e: IOException): Throwable = {
-    new SparkException(s"Unable to create partition path $partitionPath", e)
+    new SparkException(
+      errorClass = "CANNOT_CREATE_PARTITION_PATH",
+      messageParameters = Array(partitionPath.toString),
+      cause = e)
   }
 
   def unableToRenamePartitionPathError(oldPartPath: Path, e: IOException): Throwable = {
-    new SparkException(s"Unable to rename partition path $oldPartPath", e)
+    new SparkException(
+      errorClass = "CANNOT_RENAME_PARTITION_PATH",
+      messageParameters = Array(oldPartPath.toString),
+      cause = e)
   }
 
   def methodNotImplementedError(methodName: String): Throwable = {
-    new UnsupportedOperationException(s"$methodName is not implemented")
+    new SparkUnsupportedOperationException(
+      errorClass = "METHOD_NOT_IMPLEMENTED",
+      messageParameters = Array(methodName))
   }
 
   def tableStatsNotSpecifiedError(): Throwable = {
-    new IllegalStateException("table stats must be specified.")
+    new SparkIllegalStateException(
+      errorClass = "TABLE_STATISTICS_NOT_SPECIFIED",
+      messageParameters = Array.empty)
   }
 
   def unaryMinusCauseOverflowError(originValue: AnyVal): ArithmeticException = {
-    new ArithmeticException(s"- $originValue caused overflow.")
+    new SparkArithmeticException(
+      errorClass = "UNARY_MINUS_OVERFLOW",
+      messageParameters = Array(originValue.toString))
   }
 
   def binaryArithmeticCauseOverflowError(
       eval1: Short, symbol: String, eval2: Short): ArithmeticException = {
-    new ArithmeticException(s"$eval1 $symbol $eval2 caused overflow.")
+    new SparkArithmeticException(
+      errorClass = "BINARY_ARITHMETIC_OVERFLOW",
+      messageParameters = Array(eval1.toString, symbol, eval2.toString))
   }
 
   def failedSplitSubExpressionMsg(length: Int): String = {
-    "Failed to split subexpression code into small functions because " +
-      s"the parameter length of at least one split function went over the JVM limit: $length"
+    SparkThrowableHelper.getMessage(
+      errorClass = "FAILED_SPLIT_SUBEXPRESSION",
+      messageParameters = Array(length.toString))
   }
 
   def failedSplitSubExpressionError(length: Int): Throwable = {
-    new IllegalStateException(failedSplitSubExpressionMsg(length))
+    new SparkIllegalStateException(
+      errorClass = "FAILED_SPLIT_SUBEXPRESSION",
+      messageParameters = Array(length.toString))
   }
 
   def failedToCompileMsg(e: Exception): String = {
-    s"failed to compile: $e"
+    SparkThrowableHelper.getMessage(

Review comment:
       @cloud-fan, are all of these compilation failures internal errors?

##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala
##########
@@ -344,94 +345,139 @@ object QueryExecutionErrors {
 
   def unableToCreateDatabaseAsFailedToCreateDirectoryError(
       dbDefinition: CatalogDatabase, e: IOException): Throwable = {
-    new SparkException(s"Unable to create database ${dbDefinition.name} as failed " +
-      s"to create its directory ${dbDefinition.locationUri}", e)
+    new SparkException(
+      errorClass = "CANNOT_CREATE_OBJECT_DUE_TO_FAILED_DIRECTORY_CREATION",
+      messageParameters = Array("DATABASE", dbDefinition.name, dbDefinition.locationUri.toString),
+      cause = e)
   }
 
   def unableToDropDatabaseAsFailedToDeleteDirectoryError(
       dbDefinition: CatalogDatabase, e: IOException): Throwable = {
-    new SparkException(s"Unable to drop database ${dbDefinition.name} as failed " +
-      s"to delete its directory ${dbDefinition.locationUri}", e)
+    new SparkException(
+      errorClass = "CANNOT_DROP_OBJECT_DUE_TO_FAILED_DIRECTORY_DELETION",
+      messageParameters = Array("DATABASE", dbDefinition.name, dbDefinition.locationUri.toString),
+      cause = e)
   }
 
   def unableToCreateTableAsFailedToCreateDirectoryError(
       table: String, defaultTableLocation: Path, e: IOException): Throwable = {
-    new SparkException(s"Unable to create table $table as failed " +
-      s"to create its directory $defaultTableLocation", e)
+    new SparkException(
+      errorClass = "CANNOT_CREATE_OBJECT_DUE_TO_FAILED_DIRECTORY_CREATION",
+      messageParameters = Array("TABLE", table, defaultTableLocation.toString),
+      cause = e)
   }
 
   def unableToDeletePartitionPathError(partitionPath: Path, e: IOException): Throwable = {
-    new SparkException(s"Unable to delete partition path $partitionPath", e)
+    new SparkException(
+      errorClass = "CANNOT_DELETE_PARTITION_PATH",
+      messageParameters = Array(partitionPath.toString),
+      cause = e)
   }
 
   def unableToDropTableAsFailedToDeleteDirectoryError(
       table: String, dir: Path, e: IOException): Throwable = {
-    new SparkException(s"Unable to drop table $table as failed " +
-      s"to delete its directory $dir", e)
+    new SparkException(
+      errorClass = "CANNOT_DROP_OBJECT_DUE_TO_FAILED_DIRECTORY_DELETION",
+      messageParameters = Array("TABLE", table, dir.toString),
+      cause = e)
   }
 
   def unableToRenameTableAsFailedToRenameDirectoryError(
       oldName: String, newName: String, oldDir: Path, e: IOException): Throwable = {
-    new SparkException(s"Unable to rename table $oldName to $newName as failed " +
-      s"to rename its directory $oldDir", e)
+    new SparkException(
+      errorClass = "CANNOT_RENAME_TABLE_DUE_TO_FAILED_DIRECTORY_RENAMING",
+      messageParameters = Array(oldName, newName, oldDir.toString),
+      cause = e)
   }
 
   def unableToCreatePartitionPathError(partitionPath: Path, e: IOException): Throwable = {
-    new SparkException(s"Unable to create partition path $partitionPath", e)
+    new SparkException(
+      errorClass = "CANNOT_CREATE_PARTITION_PATH",
+      messageParameters = Array(partitionPath.toString),
+      cause = e)
   }
 
   def unableToRenamePartitionPathError(oldPartPath: Path, e: IOException): Throwable = {
-    new SparkException(s"Unable to rename partition path $oldPartPath", e)
+    new SparkException(
+      errorClass = "CANNOT_RENAME_PARTITION_PATH",
+      messageParameters = Array(oldPartPath.toString),
+      cause = e)
   }
 
   def methodNotImplementedError(methodName: String): Throwable = {
-    new UnsupportedOperationException(s"$methodName is not implemented")
+    new SparkUnsupportedOperationException(
+      errorClass = "METHOD_NOT_IMPLEMENTED",
+      messageParameters = Array(methodName))
   }
 
   def tableStatsNotSpecifiedError(): Throwable = {
-    new IllegalStateException("table stats must be specified.")
+    new SparkIllegalStateException(
+      errorClass = "TABLE_STATISTICS_NOT_SPECIFIED",
+      messageParameters = Array.empty)
   }
 
   def unaryMinusCauseOverflowError(originValue: AnyVal): ArithmeticException = {
-    new ArithmeticException(s"- $originValue caused overflow.")
+    new SparkArithmeticException(
+      errorClass = "UNARY_MINUS_OVERFLOW",
+      messageParameters = Array(originValue.toString))
   }
 
   def binaryArithmeticCauseOverflowError(
       eval1: Short, symbol: String, eval2: Short): ArithmeticException = {
-    new ArithmeticException(s"$eval1 $symbol $eval2 caused overflow.")
+    new SparkArithmeticException(
+      errorClass = "BINARY_ARITHMETIC_OVERFLOW",
+      messageParameters = Array(eval1.toString, symbol, eval2.toString))
   }
 
   def failedSplitSubExpressionMsg(length: Int): String = {
-    "Failed to split subexpression code into small functions because " +
-      s"the parameter length of at least one split function went over the JVM limit: $length"
+    SparkThrowableHelper.getMessage(
+      errorClass = "FAILED_SPLIT_SUBEXPRESSION",
+      messageParameters = Array(length.toString))
   }
 
   def failedSplitSubExpressionError(length: Int): Throwable = {
-    new IllegalStateException(failedSplitSubExpressionMsg(length))
+    new SparkIllegalStateException(
+      errorClass = "FAILED_SPLIT_SUBEXPRESSION",
+      messageParameters = Array(length.toString))
   }
 
   def failedToCompileMsg(e: Exception): String = {
-    s"failed to compile: $e"
+    SparkThrowableHelper.getMessage(
+      errorClass = "COMPILATION_FAILED",
+      messageParameters = Array(e.toString))
   }
 
   def internalCompilerError(e: InternalCompilerException): Throwable = {
-    new InternalCompilerException(failedToCompileMsg(e), e)
+    new SparkInternalCompilerException(
+      errorClass = "COMPILATION_FAILED",
+      messageParameters = Array(e.toString))
   }
 
   def compilerError(e: CompileException): Throwable = {
-    new CompileException(failedToCompileMsg(e), e.getLocation)
+    new SparkCompileException(
+      errorClass = "COMPILATION_FAILED",
+      messageParameters = Array(e.toString),
+      location = e.getLocation)
   }
 
   def unsupportedTableChangeError(e: IllegalArgumentException): Throwable = {
-    new SparkException(s"Unsupported table change: ${e.getMessage}", e)
+    new SparkException(
+      errorClass = "UNSUPPORTED_TABLE_CHANGE",
+      messageParameters = Array(e.getMessage),
+      cause = e)
   }
 
   def notADatasourceRDDPartitionError(split: Partition): Throwable = {
-    new SparkException(s"[BUG] Not a DataSourceRDDPartition: $split")
+    new SparkException(
+      errorClass = "NOT_A_DATA_SOURCE_RDD_PARTITION",

Review comment:
       This is an internal error; let's use `INTERNAL_ERROR`

##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -11,17 +15,51 @@
     "message" : [ "%s cannot be represented as Decimal(%s, %s)." ],
     "sqlState" : "22005"
   },
+  "CANNOT_CREATE_OBJECT_DUE_TO_FAILED_DIRECTORY_CREATION" : {
+    "message" : [ "Unable to CREATE %s %s as failed to create its directory %s." ]
+  },
+  "CANNOT_CREATE_PARTITION_PATH" : {
+    "message" : [ "Unable to create partition path %s" ]
+  },
+  "CANNOT_DELETE_PARTITION_PATH" : {
+    "message" : [ "Unable to delete partition path %s" ]
+  },
+  "CANNOT_DROP_OBJECT_DUE_TO_FAILED_DIRECTORY_DELETION" : {
+    "message" : [ "Unable to DROP %s %s as failed to delete its directory %s." ]
+  },
+  "CANNOT_EVALUATE_EXPRESSION" : {
+    "message" : [ "Cannot evaluate expression: %s" ]
+  },
+  "CANNOT_GENERATE_CODE_FOR_EXPRESSION" : {

Review comment:
       These aren't from this PR, right?

##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -11,17 +15,51 @@
     "message" : [ "%s cannot be represented as Decimal(%s, %s)." ],
     "sqlState" : "22005"
   },
+  "CANNOT_CREATE_OBJECT_DUE_TO_FAILED_DIRECTORY_CREATION" : {
+    "message" : [ "Unable to CREATE %s %s as failed to create its directory %s." ]
+  },
+  "CANNOT_CREATE_PARTITION_PATH" : {
+    "message" : [ "Unable to create partition path %s" ]
+  },
+  "CANNOT_DELETE_PARTITION_PATH" : {
+    "message" : [ "Unable to delete partition path %s" ]
+  },
+  "CANNOT_DROP_OBJECT_DUE_TO_FAILED_DIRECTORY_DELETION" : {
+    "message" : [ "Unable to DROP %s %s as failed to delete its directory %s." ]
+  },
+  "CANNOT_EVALUATE_EXPRESSION" : {
+    "message" : [ "Cannot evaluate expression: %s" ]
+  },
+  "CANNOT_GENERATE_CODE_FOR_EXPRESSION" : {
+    "message" : [ "Cannot generate code for expression: %s" ]
+  },
   "CANNOT_PARSE_DECIMAL" : {
     "message" : [ "Cannot parse decimal" ],
     "sqlState" : "42000"
   },
+  "CANNOT_RENAME_PARTITION_PATH" : {
+    "message" : [ "Unable to rename partition path %s" ]
+  },
+  "CANNOT_RENAME_TABLE_DUE_TO_FAILED_DIRECTORY_RENAMING" : {
+    "message" : [ "Unable to rename table %s to %s as failed to rename its directory %s" ]
+  },
+  "CANNOT_TERMINATE_GENERATOR" : {
+    "message" : [ "Cannot terminate expression: %s" ]
+  },
   "CAST_CAUSES_OVERFLOW" : {
     "message" : [ "Casting %s to %s causes overflow" ],
     "sqlState" : "22005"
   },
+  "COMPILATION_FAILED" : {
+    "message" : [ "failed to compile: %s" ]
+  },
   "CONCURRENT_QUERY" : {
     "message" : [ "Another instance of this query was just started by a concurrent session." ]
   },
+  "DATA_PATH_NOT_SPECIFIED" : {

Review comment:
       Let's call this `MISSING_DATA_PATH`?

##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -11,17 +15,51 @@
     "message" : [ "%s cannot be represented as Decimal(%s, %s)." ],
     "sqlState" : "22005"
   },
+  "CANNOT_CREATE_OBJECT_DUE_TO_FAILED_DIRECTORY_CREATION" : {

Review comment:
       Actually, what if we just have three error classes: `CANNOT_CREATE_DIRECTORY`, `CANNOT_DELETE_DIRECTORY` and `CANNOT_RENAME_DIRECTORY`? This would be more concise and can be used more generally as well. Then we can make the error message like `Cannot %s as failed to create directory %s`.

##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala
##########
@@ -344,94 +345,139 @@ object QueryExecutionErrors {
 
   def unableToCreateDatabaseAsFailedToCreateDirectoryError(
       dbDefinition: CatalogDatabase, e: IOException): Throwable = {
-    new SparkException(s"Unable to create database ${dbDefinition.name} as failed " +
-      s"to create its directory ${dbDefinition.locationUri}", e)
+    new SparkException(
+      errorClass = "CANNOT_CREATE_OBJECT_DUE_TO_FAILED_DIRECTORY_CREATION",
+      messageParameters = Array("DATABASE", dbDefinition.name, dbDefinition.locationUri.toString),
+      cause = e)
   }
 
   def unableToDropDatabaseAsFailedToDeleteDirectoryError(
       dbDefinition: CatalogDatabase, e: IOException): Throwable = {
-    new SparkException(s"Unable to drop database ${dbDefinition.name} as failed " +
-      s"to delete its directory ${dbDefinition.locationUri}", e)
+    new SparkException(
+      errorClass = "CANNOT_DROP_OBJECT_DUE_TO_FAILED_DIRECTORY_DELETION",
+      messageParameters = Array("DATABASE", dbDefinition.name, dbDefinition.locationUri.toString),
+      cause = e)
   }
 
   def unableToCreateTableAsFailedToCreateDirectoryError(
       table: String, defaultTableLocation: Path, e: IOException): Throwable = {
-    new SparkException(s"Unable to create table $table as failed " +
-      s"to create its directory $defaultTableLocation", e)
+    new SparkException(
+      errorClass = "CANNOT_CREATE_OBJECT_DUE_TO_FAILED_DIRECTORY_CREATION",
+      messageParameters = Array("TABLE", table, defaultTableLocation.toString),
+      cause = e)
   }
 
   def unableToDeletePartitionPathError(partitionPath: Path, e: IOException): Throwable = {
-    new SparkException(s"Unable to delete partition path $partitionPath", e)
+    new SparkException(
+      errorClass = "CANNOT_DELETE_PARTITION_PATH",
+      messageParameters = Array(partitionPath.toString),
+      cause = e)
   }
 
   def unableToDropTableAsFailedToDeleteDirectoryError(
       table: String, dir: Path, e: IOException): Throwable = {
-    new SparkException(s"Unable to drop table $table as failed " +
-      s"to delete its directory $dir", e)
+    new SparkException(
+      errorClass = "CANNOT_DROP_OBJECT_DUE_TO_FAILED_DIRECTORY_DELETION",
+      messageParameters = Array("TABLE", table, dir.toString),
+      cause = e)
   }
 
   def unableToRenameTableAsFailedToRenameDirectoryError(
       oldName: String, newName: String, oldDir: Path, e: IOException): Throwable = {
-    new SparkException(s"Unable to rename table $oldName to $newName as failed " +
-      s"to rename its directory $oldDir", e)
+    new SparkException(
+      errorClass = "CANNOT_RENAME_TABLE_DUE_TO_FAILED_DIRECTORY_RENAMING",
+      messageParameters = Array(oldName, newName, oldDir.toString),
+      cause = e)
   }
 
   def unableToCreatePartitionPathError(partitionPath: Path, e: IOException): Throwable = {
-    new SparkException(s"Unable to create partition path $partitionPath", e)
+    new SparkException(
+      errorClass = "CANNOT_CREATE_PARTITION_PATH",
+      messageParameters = Array(partitionPath.toString),
+      cause = e)
   }
 
   def unableToRenamePartitionPathError(oldPartPath: Path, e: IOException): Throwable = {
-    new SparkException(s"Unable to rename partition path $oldPartPath", e)
+    new SparkException(
+      errorClass = "CANNOT_RENAME_PARTITION_PATH",
+      messageParameters = Array(oldPartPath.toString),
+      cause = e)
   }
 
   def methodNotImplementedError(methodName: String): Throwable = {
-    new UnsupportedOperationException(s"$methodName is not implemented")
+    new SparkUnsupportedOperationException(
+      errorClass = "METHOD_NOT_IMPLEMENTED",
+      messageParameters = Array(methodName))
   }
 
   def tableStatsNotSpecifiedError(): Throwable = {
-    new IllegalStateException("table stats must be specified.")
+    new SparkIllegalStateException(
+      errorClass = "TABLE_STATISTICS_NOT_SPECIFIED",

Review comment:
       @cloud-fan, is this an internal error? I can't know a use case where the user encounters this.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-937721523


   **[Test build #143973 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143973/testReport)** for PR 34190 at commit [`98ba4b9`](https://github.com/apache/spark/commit/98ba4b9d47caabafc910a5c39f8d8b7e0eb7c03b).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34190:
URL: https://github.com/apache/spark/pull/34190#issuecomment-937886337


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143973/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] github-actions[bot] closed pull request #34190: [SPARK-36293][SQL] Refactor fourth set of 20 query execution errors to use error classes

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed pull request #34190:
URL: https://github.com/apache/spark/pull/34190


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org