Skip to content

[SPARK-55813][SQL] Rename _LEGACY_ERROR_TEMP_2078 to JDBC_TABLE_AND_QUERY_BOTH_SPECIFIED with SQL state 42000#54592

Open
miland-db wants to merge 1 commit intoapache:masterfrom
miland-db:milan-dankovic_data/jdbc-table-and-query
Open

[SPARK-55813][SQL] Rename _LEGACY_ERROR_TEMP_2078 to JDBC_TABLE_AND_QUERY_BOTH_SPECIFIED with SQL state 42000#54592
miland-db wants to merge 1 commit intoapache:masterfrom
miland-db:milan-dankovic_data/jdbc-table-and-query

Conversation

@miland-db
Copy link
Contributor

What changes were proposed in this pull request?

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

Changes:

  • Added JDBC_TABLE_AND_QUERY_BOTH_SPECIFIED error class to error-conditions.json with SQL state 42000
  • Updated QueryExecutionErrors.cannotSpecifyBothJdbcTableNameAndQueryError() to use the new error class
  • Removed _LEGACY_ERROR_TEMP_2078 legacy error class

Why are the changes needed?

Previously, this error used _LEGACY_ERROR_TEMP_2078 without a SQL state, making it harder to identify and handle programmatically in error monitoring systems.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Updated tests in JDBCSuite.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.

2 participants