Skip to content

[SPARK-59460][SQL] Assign a name to the error condition _LEGACY_ERROR_TEMP_1072 - #58759

Open
Ma77Ball wants to merge 1 commit into
apache:masterfrom
Ma77Ball:assign-name-legacy-error-1072
Open

[SPARK-59460][SQL] Assign a name to the error condition _LEGACY_ERROR_TEMP_1072#58759
Ma77Ball wants to merge 1 commit into
apache:masterfrom
Ma77Ball:assign-name-legacy-error-1072

Conversation

@Ma77Ball

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Rename the legacy error condition _LEGACY_ERROR_TEMP_1072 to TABLES_OR_VIEWS_NOT_IN_SAME_DATABASE (SQLSTATE 0A000). It is raised by SessionCatalog.getTablesByName when the requested tables/views span more than one database. The message is also reworded for clarity.

Why are the changes needed?

The error-conditions README disallows new _LEGACY_ERROR_TEMP_* entries and asks existing ones to be resolved. This resolves one (part of SPARK-37935).

Does this PR introduce any user-facing change?

Yes. The condition becomes TABLES_OR_VIEWS_NOT_IN_SAME_DATABASE, and the message is reworded to "Cannot retrieve tables or views that do not belong to the same database. Requested: ."

How was this patch tested?

Strengthened the existing SessionCatalogSuite test to assert the condition and parameters via checkError (it previously only intercepted the exception). SparkThrowableSuite passes.

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

Co-authored with Claude Opus 4.8

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