Skip to content

[SPARK-37939][SQL][3.3] Use error classes in the parsing errors of properties #36916

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

Closed

Conversation

panbingkun
Copy link
Contributor

What changes were proposed in this pull request?

Migrate the following errors in QueryParsingErrors onto use error classes:

  • cannotCleanReservedNamespacePropertyError => UNSUPPORTED_FEATURE
  • cannotCleanReservedTablePropertyError => UNSUPPORTED_FEATURE
  • invalidPropertyKeyForSetQuotedConfigurationError => INVALID_PROPERTY_KEY
  • invalidPropertyValueForSetQuotedConfigurationError => INVALID_PROPERTY_VALUE
  • propertiesAndDbPropertiesBothSpecifiedError => UNSUPPORTED_FEATURE

This is a backport of #36561.

Why are the changes needed?

Porting parsing errors of partitions to new error framework, improve test coverage, and document expected error messages in tests.

Does this PR introduce any user-facing change?

No

How was this patch tested?

By running new test:

$ build/sbt "sql/testOnly *QueryParsingErrorsSuite*"

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@MaxGekk
Copy link
Member

MaxGekk commented Jun 21, 2022

+1, LGTM. Merging to 3.3.
Thank you, @panbingkun.

MaxGekk pushed a commit that referenced this pull request Jun 21, 2022
…operties

## What changes were proposed in this pull request?
Migrate the following errors in QueryParsingErrors onto use error classes:

- cannotCleanReservedNamespacePropertyError => UNSUPPORTED_FEATURE
- cannotCleanReservedTablePropertyError => UNSUPPORTED_FEATURE
- invalidPropertyKeyForSetQuotedConfigurationError => INVALID_PROPERTY_KEY
- invalidPropertyValueForSetQuotedConfigurationError => INVALID_PROPERTY_VALUE
- propertiesAndDbPropertiesBothSpecifiedError => UNSUPPORTED_FEATURE

This is a backport of #36561.

### Why are the changes needed?
Porting parsing errors of partitions to new error framework, improve test coverage, and document expected error messages in tests.

### Does this PR introduce any user-facing change?
No

### How was this patch tested?
By running new test:
```
$ build/sbt "sql/testOnly *QueryParsingErrorsSuite*"
```

Closes #36916 from panbingkun/branch-3.3-SPARK-37939.

Authored-by: panbingkun <pbk1982@gmail.com>
Signed-off-by: Max Gekk <max.gekk@gmail.com>
@MaxGekk MaxGekk closed this Jun 21, 2022
@panbingkun panbingkun deleted the branch-3.3-SPARK-37939 branch July 2, 2022 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants