Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-49873][SQL] Assign proper error class for _LEGACY_ERROR_TEMP_1325 #48346

Closed
wants to merge 2 commits into from

Conversation

itholic
Copy link
Contributor

@itholic itholic commented Oct 4, 2024

What changes were proposed in this pull request?

This PR proposes to assign proper error class for _LEGACY_ERROR_TEMP_1325

Why are the changes needed?

To improve user facing error message by providing proper error condition and sql state

Does this PR introduce any user-facing change?

Improve user-facing error message

How was this patch tested?

Updated the existing UT

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

No

@github-actions github-actions bot added the SQL label Oct 4, 2024
@itholic
Copy link
Contributor Author

itholic commented Oct 4, 2024

cc @srielau @cloud-fan @MaxGekk

Copy link
Member

@MaxGekk MaxGekk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@itholic Could you fix the failed tests:

[info] - cannot set/unset static SQL conf *** FAILED *** (5 milliseconds)
[info]   "[CANNOT_MODIFY_CONFIG] Cannot modify the value of the Spark config: spark.sql.globalTempDatabase.
[info]   See also 'https://spark.apache.org/docs/latest/sql-migration-guide.html#ddl-statements'. SQLSTATE: 46110" did not contain "Cannot modify the value of a static config" (SQLConfSuite.scala:319)

Copy link
Member

@MaxGekk MaxGekk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting for CI.

"Cannot modify the value of a static config: spark.sql.hive.thriftServer.singleSession"))
"CANNOT_MODIFY_CONFIG"))
Copy link
Contributor Author

@itholic itholic Oct 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to retrieve the root case by using getCause to use checkError, but seems like the SQLException just returns null

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, the change lgtm.

@MaxGekk
Copy link
Member

MaxGekk commented Oct 9, 2024

I think the failed test is not related to your changes:

org.apache.spark.sql.execution.adaptive.AdaptiveQueryExecSuite

I re-ran it locally.

+1, LGTM. Merging to master.
Thank you, @itholic.

@MaxGekk MaxGekk closed this in 97a5aa6 Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants