[SPARK-58267][SQL] Assign a name to the error condition _LEGACY_ERROR_TEMP_1059#57445
Open
Ma77Ball wants to merge 2 commits into
Open
[SPARK-58267][SQL] Assign a name to the error condition _LEGACY_ERROR_TEMP_1059#57445Ma77Ball wants to merge 2 commits into
Ma77Ball wants to merge 2 commits into
Conversation
…E_FORMAT_FOR_STORED_AS
Ma77Ball
marked this pull request as ready for review
July 22, 2026 23:54
uros-b
approved these changes
Jul 23, 2026
Member
|
Thank you @Ma77Ball! |
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?
Rename the legacy error condition
_LEGACY_ERROR_TEMP_1059toINVALID_FILE_FORMAT_FOR_STORED_AS, with SQLSTATE42601.Why are the changes needed?
The error-conditions README disallows new
_LEGACY_ERROR_TEMP_*entries and asksexisting ones to be resolved. This resolves one of them.
The error is raised by
ResolveSessionCatalogwhen a CREATE TABLE usesSTORED AS <fileFormat>with a file format that does not map to a known Hive SerDe, e.g.CREATE TABLE t (c1 INT) STORED AS UNKNOWN_FORMAT. It is an analysis-timeAnalysisException.Does this PR introduce any user-facing change?
No.
How was this patch tested?
Added a
checkErrortest inQueryCompilationErrorsSuitethat runsCREATE TABLE ... STORED AS <unknown format>and asserts theINVALID_FILE_FORMAT_FOR_STORED_AScondition.
build/sbt "core/testOnly org.apache.spark.SparkThrowableSuite"passes.Was this patch authored or co-authored using generative AI tooling?
Co-Authored with: Claude Opus 4.8