andygrove commented on code in PR #384:
URL: https://github.com/apache/datafusion-comet/pull/384#discussion_r1594407351
##########
spark/src/test/scala/org/apache/comet/CometCastSuite.scala:
##########
@@ -960,11 +958,19 @@ class CometCastSuite extends CometTestBase with
AdaptiveSparkPlanHelper {
val cometMessageModified = cometMessage
.replace("[CAST_INVALID_INPUT] ", "")
.replace("[CAST_OVERFLOW] ", "")
- assert(cometMessageModified == sparkMessage)
+ .replace("[NUMERIC_VALUE_OUT_OF_RANGE] ", "")
+
+ if (sparkMessage.contains("cannot be represented as")) {
+ assert(cometMessage.contains("cannot be represented as"))
+ } else {
+ assert(cometMessageModified == sparkMessage)
+ }
} else {
// for Spark 3.2 we just make sure we are seeing a similar type
of error
if (sparkMessage.contains("causes overflow")) {
assert(cometMessage.contains("due to an overflow"))
+ } else if (sparkMessage.contains("cannot be represented as")) {
+ assert(cometMessage.contains("cannot be represented as"))
Review Comment:
I can see that the approach we have for handling error message comparison
for Spark 3.2 and 3.3 needs some rethinking. I am going to make a proposal to
improve this.
https://github.com/apache/datafusion-comet/issues/402
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]