[SPARK-47258][SQL] Assign names to error classes _LEGACY_ERROR_TEMP_127[0-5]
What changes were proposed in this pull request?
This PR renames a few error classes related to usage of SHOW CREATE TABLE errors:
_LEGACY_ERROR_TEMP_1270 => UNSUPPORTED_SHOW_CREATE_TABLE.ON_TEMPORARY_VIEW
_LEGACY_ERROR_TEMP_1271 => UNSUPPORTED_SHOW_CREATE_TABLE.WITH_UNSUPPORTED_FEATURE
_LEGACY_ERROR_TEMP_1272 => UNSUPPORTED_SHOW_CREATE_TABLE.ON_TRANSACTIONAL_HIVE_TABLE
_LEGACY_ERROR_TEMP_1273 => UNSUPPORTED_SHOW_CREATE_TABLE.WITH_UNSUPPORTED_SERDE_CONFIGURATION
_LEGACY_ERROR_TEMP_1274 => UNSUPPORTED_SHOW_CREATE_TABLE.ON_SPARK_DATA_SOURCE_TABLE_WITH_AS_SERDE
_LEGACY_ERROR_TEMP_1275 => UNSUPPORTED_SHOW_CREATE_TABLE.WITH_UNSUPPORTED_FEATURE
Also, this PR changes tests in corresponding test suite to use checkError() method which checks the error class name, context, error message parameters, etc.
Why are the changes needed?
Proper error names and messages improve user experience with Spark SQL.
Does this PR introduce any user-facing change?
Yes, this PR changes user-facing error class and message.
How was this patch tested?
By running tests from ShowCreateTableSuiteBase and subclasses.
Was this patch authored or co-authored using generative AI tooling?
No
cc @panbingkun @MaxGekk @itholic @beliefer
Is this one ready to go ? @panbingkun
Is this one ready to go ? @panbingkun
After a discussion with @LuciferYang , we think that in _LEGACY_ERROR_TEMP_1271 and _LEGACY_ERROR_TEMP_1273 , it is necessary to retain additional parameters and expose them to users. How about keeping the current ones and giving up reusing FORBIDDEN_OPERATION?
@wayneguow Please, resolve conflicts and rebase on the recent master.
@MaxGekk I rebased the master branch and we can move it forward.
Gentle ping @MaxGekk , PTAL when you have time.
@MaxGekk Thanks for reviews. I updated as suggested.
+1, LGTM. Merging to master. Thank you, @wayneguow and @LuciferYang for review.