-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-42305][SQL] Integrate _LEGACY_ERROR_TEMP_1229 into DECIMAL_PRECISION_EXCEEDS_MAX_PRECISION
#39875
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
Conversation
|
I think we can reuse |
srielau
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| val e = intercept[SparkArithmeticException](defaultParser.parseExpression("1.20E-38BD")) | ||
| checkError( | ||
| exception = parseException("1.20E-38BD"), | ||
| errorClass = "_LEGACY_ERROR_TEMP_0061", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I didn't get. The PR title and description are telling only about one error class LEGACY_ERROR_TEMP_1229 but your PR affects another one. Could you elaborate this and revert unrelated changes, or make PR's title/description consistent with PR's changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, you're right.
I should have fixed sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala rather than tests.
Just reverted unrelated changes and fix them in proper way.
Thanks!
LuciferYang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, LGTM
|
+1, LGTM. Merging to master/3.4. |
…PRECISION_EXCEEDS_MAX_PRECISION`
### What changes were proposed in this pull request?
This PR proposes to integrate `_LEGACY_ERROR_TEMP_1229` into `DECIMAL_PRECISION_EXCEEDS_MAX_PRECISION`.
**_LEGACY_ERROR_TEMP_1229**
```json
"_LEGACY_ERROR_TEMP_1229" : {
"message" : [
"<decimalType> can only support precision up to <precision>."
]
},
```
**DECIMAL_PRECISION_EXCEEDS_MAX_PRECISION**
```json
"DECIMAL_PRECISION_EXCEEDS_MAX_PRECISION" : {
"message" : [
"Decimal precision <precision> exceeds max precision <maxPrecision>."
],
"sqlState" : "22003"
},
```
### Why are the changes needed?
We should assign proper name to _LEGACY_ERROR_TEMP_*
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
`./build/sbt "sql/testOnly org.apache.spark.sql.SQLQueryTestSuite*"`
Closes #39875 from itholic/LEGACY_1229.
Authored-by: itholic <haejoon.lee@databricks.com>
Signed-off-by: Max Gekk <max.gekk@gmail.com>
(cherry picked from commit f8e06c1)
Signed-off-by: Max Gekk <max.gekk@gmail.com>
…PRECISION_EXCEEDS_MAX_PRECISION`
### What changes were proposed in this pull request?
This PR proposes to integrate `_LEGACY_ERROR_TEMP_1229` into `DECIMAL_PRECISION_EXCEEDS_MAX_PRECISION`.
**_LEGACY_ERROR_TEMP_1229**
```json
"_LEGACY_ERROR_TEMP_1229" : {
"message" : [
"<decimalType> can only support precision up to <precision>."
]
},
```
**DECIMAL_PRECISION_EXCEEDS_MAX_PRECISION**
```json
"DECIMAL_PRECISION_EXCEEDS_MAX_PRECISION" : {
"message" : [
"Decimal precision <precision> exceeds max precision <maxPrecision>."
],
"sqlState" : "22003"
},
```
### Why are the changes needed?
We should assign proper name to _LEGACY_ERROR_TEMP_*
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
`./build/sbt "sql/testOnly org.apache.spark.sql.SQLQueryTestSuite*"`
Closes apache#39875 from itholic/LEGACY_1229.
Authored-by: itholic <haejoon.lee@databricks.com>
Signed-off-by: Max Gekk <max.gekk@gmail.com>
(cherry picked from commit f8e06c1)
Signed-off-by: Max Gekk <max.gekk@gmail.com>
What changes were proposed in this pull request?
This PR proposes to integrate
_LEGACY_ERROR_TEMP_1229intoDECIMAL_PRECISION_EXCEEDS_MAX_PRECISION._LEGACY_ERROR_TEMP_1229
DECIMAL_PRECISION_EXCEEDS_MAX_PRECISION
Why are the changes needed?
We should assign proper name to LEGACY_ERROR_TEMP*
Does this PR introduce any user-facing change?
No
How was this patch tested?
./build/sbt "sql/testOnly org.apache.spark.sql.SQLQueryTestSuite*"