[SPARK-38743][SQL] Test the error class: MISSING_STATIC_PARTITION_COLUMN#54692
Open
deepujain wants to merge 1 commit into
Open
[SPARK-38743][SQL] Test the error class: MISSING_STATIC_PARTITION_COLUMN#54692deepujain wants to merge 1 commit into
deepujain wants to merge 1 commit into
Conversation
ecbe82e to
30e8a2a
Compare
Author
|
Rebased on master. Ran QueryCompilationErrorsSuite (SPARK-38743) locally passed. Ready for CI. |
30e8a2a to
576a4cf
Compare
Author
|
Rebased on current master. Ran |
576a4cf to
8f21bab
Compare
Author
|
Rebased this on current master. I reran |
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.
Summary
Adds test coverage and standard error class for the
MISSING_STATIC_PARTITION_COLUMNcase in QueryCompilationErrors. When an INSERT or DELETE specifies a static partition column name that is not found in the target table's output, Spark now throws anAnalysisExceptionwith error classMISSING_STATIC_PARTITION_COLUMNand sqlState42703, instead of a generic internal error.Change
MISSING_STATIC_PARTITION_COLUMNwith message "Static partition column is not found in the table." and sqlState42703.missingStaticPartitionColumn(staticName)to throwAnalysisExceptionwith error classMISSING_STATIC_PARTITION_COLUMNandmessageParameters = Map("staticName" -> toSQLId(staticName))instead ofSparkException.internalError.SPARK-38743: MISSING_STATIC_PARTITION_COLUMNthat asserts error class, sqlState, and message parameters for the exception fromQueryCompilationErrors.missingStaticPartitionColumn("p").Tests
New test in
QueryCompilationErrorsSuitecovers the error class, sqlState, and message parameters as required by the JIRA.Fixes SPARK-38743
JIRA assignee for credit: deepujain