[SPARK-38112][SQL] Use error classes in the execution errors of date/timestamp handling#35670
[SPARK-38112][SQL] Use error classes in the execution errors of date/timestamp handling#35670ivoson wants to merge 7 commits intoapache:masterfrom
Conversation
|
cc @MaxGekk FYI |
| def this(version: String, message: String, cause: Throwable) = | ||
| this ( | ||
| version = version, | ||
| message = s"You may get a different result due to the upgrading of Spark $version: $message", |
There was a problem hiding this comment.
Let's avoid error message duplication. error-classes.json should be one source of truth:
"INCONSISTENT_BEHAVIOR_CROSS_VERSION" : {
"message" : [ "You may get a different result due to the upgrading of Spark %s: %s" ]
},
|
|
||
| assert(e.getErrorClass === "INCONSISTENT_BEHAVIOR_CROSS_VERSION") | ||
| assert(e.getMessage | ||
| .startsWith("You may get a different result due to the upgrading of Spark 3.0: \n" + |
There was a problem hiding this comment.
The message confuses slightly. We run Spark 3.3.0-SNAPSHOT (almost 3.3) and try to read a file written by Spark 2.4 but the message says: due to the upgrading of Spark 3.0.
Should be somehow: ... due to upgrading to Spark >= 3.0?
There was a problem hiding this comment.
Spark >= 3.0 sounds good. Will address in next iteration.
|
Can one of the admins verify this patch? |
|
Hey @MaxGekk . Comments addressed, please take a look when you have time. Thanks. |
|
|
||
| assert(e.getErrorClass === "INCONSISTENT_BEHAVIOR_CROSS_VERSION") | ||
| assert(e.getMessage | ||
| .startsWith("You may get a different result due to the upgrading to Spark >= 3.0: \n" + |
There was a problem hiding this comment.
Could you check entire error message, please. See the motivation for that in PR's description #35416
|
@ivoson Could you fix coding style: |
Thanks @MaxGekk . Fixed. |
|
+1, LGTM. Merging to master. |
|
Thanks for the review. @MaxGekk |
What changes were proposed in this pull request?
Migrate the following errors in QueryExecutionErrors onto use error classes:
Why are the changes needed?
Porting date/timestamp execute errors to new error framework.
Does this PR introduce any user-facing change?
No
How was this patch tested?
UT added.