coderfender commented on code in PR #2919:
URL: https://github.com/apache/datafusion-comet/pull/2919#discussion_r2627930824
##########
spark/src/test/scala/org/apache/comet/CometCastSuite.scala:
##########
@@ -1296,9 +1283,9 @@ class CometCastSuite extends CometTestBase with
AdaptiveSparkPlanHelper {
if (CometSparkSessionExtensions.isSpark40Plus) {
// for Spark 4 we expect to sparkException carries the
message
assert(
- sparkException.getMessage
+ sparkMessage
.replace(".WITH_SUGGESTION] ", "]")
- .startsWith(cometMessage))
+ .startsWith(cometMessage.replaceAll("If.+$", "")))
Review Comment:
Yes. Something like
```
val expectedMsg = "failed with .."
assume(isSpark40plus)
Try {spark.sql("<some code which could throw an exception>")}
parse exception message and make sure that replaceAll("If.+$", "") works as
expected
```
--
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]