spark icon indicating copy to clipboard operation
spark copied to clipboard

[SPARK-47258][SQL] Assign names to error classes _LEGACY_ERROR_TEMP_127[0-5]

Open wayneguow opened this issue 1 year ago • 3 comments

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

wayneguow avatar May 28 '24 07:05 wayneguow

cc @panbingkun @MaxGekk @itholic @beliefer

LuciferYang avatar May 28 '24 07:05 LuciferYang

Is this one ready to go ? @panbingkun

LuciferYang avatar Jun 05 '24 07:06 LuciferYang

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 avatar Jun 14 '24 11:06 wayneguow

@wayneguow Please, resolve conflicts and rebase on the recent master.

@MaxGekk I rebased the master branch and we can move it forward.

wayneguow avatar Aug 14 '24 12:08 wayneguow

Gentle ping @MaxGekk , PTAL when you have time.

wayneguow avatar Aug 20 '24 06:08 wayneguow

@MaxGekk Thanks for reviews. I updated as suggested.

wayneguow avatar Aug 24 '24 00:08 wayneguow

+1, LGTM. Merging to master. Thank you, @wayneguow and @LuciferYang for review.

MaxGekk avatar Aug 26 '24 11:08 MaxGekk