Skip to content

[SPARK-55814][SQL] Add proper error class and SQL state for defineTempViewWithIfNotExistsError#54594

Open
miland-db wants to merge 2 commits intoapache:masterfrom
miland-db:milan-dankovic_data/temp-view-with-if-not-exists
Open

[SPARK-55814][SQL] Add proper error class and SQL state for defineTempViewWithIfNotExistsError#54594
miland-db wants to merge 2 commits intoapache:masterfrom
miland-db:milan-dankovic_data/temp-view-with-if-not-exists

Conversation

@miland-db
Copy link
Contributor

@miland-db miland-db commented Mar 3, 2026

What changes were proposed in this pull request?

This PR adds a proper error class and SQL state for the defineTempViewWithIfNotExistsError parsing exception.

Changes:

  • Added TEMP_VIEW_IF_NOT_EXISTS_NOT_ALLOWED error class to error-conditions.json with SQL state 0A000
  • Updated QueryParsingErrors.defineTempViewWithIfNotExistsError() to use the new error class
  • Removed _LEGACY_ERROR_TEMP_0053 legacy error class

Why are the changes needed?

Previously, this error used _LEGACY_ERROR_TEMP_0053 without a SQL state, making it harder
to identify.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Updated test in SQLViewSuite.scala.

Was this patch authored or co-authored using generative AI tooling?

No.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant