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-45458][SQL] Convert IllegalArgumentException to SparkIllegalArgumentException in bitwiseExpressions #43271

Closed
wants to merge 7 commits into from

Conversation

panbingkun
Copy link
Contributor

@panbingkun panbingkun commented Oct 8, 2023

What changes were proposed in this pull request?

The pr aims to convert IllegalArgumentException to SparkIllegalArgumentException in bitwiseExpressions.

Why are the changes needed?

The changes improve the error framework.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

  • Update existed UT.
  • Pass GA

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

No.

…gumentException in bitwiseExpressions and add some UT
…gumentException in bitwiseExpressions and add some UT
…gumentException in bitwiseExpressions and add some UT
@panbingkun panbingkun changed the title [SPARK-45458][SQL] Convert IllegalArgumentException to SparkIllegalArgumentException in bitwiseExpressions and add some UT [SPARK-45458][SQL] Convert IllegalArgumentException to SparkIllegalArgumentException in bitwiseExpressions Oct 9, 2023
@panbingkun
Copy link
Contributor Author

cc @MaxGekk @cloud-fan

@@ -92,6 +92,11 @@
],
"sqlState" : "22003"
},
"BIT_POSITION_OUT_OF_RANGE" : {
Copy link
Contributor

Choose a reason for hiding this comment

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

IIRC we have an error class for invalid function arguments, shall we reuse it?

Copy link
Member

Choose a reason for hiding this comment

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

We have the error class INVALID_PARAMETER_VALUE, @panbingkun could you re-use or create a sub-class there, please.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, let me to do it.

@@ -92,6 +92,11 @@
],
"sqlState" : "22003"
},
"BIT_POSITION_OUT_OF_RANGE" : {
Copy link
Member

Choose a reason for hiding this comment

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

We have the error class INVALID_PARAMETER_VALUE, @panbingkun could you re-use or create a sub-class there, please.

@MaxGekk
Copy link
Member

MaxGekk commented Oct 10, 2023

+1, LGTM. Merging to master.
Thank you, @panbingkun and @cloud-fan for review.

@MaxGekk MaxGekk closed this in 7623076 Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants