coderfender commented on code in PR #1996:
URL: https://github.com/apache/datafusion-comet/pull/1996#discussion_r2241291653
##########
spark/src/test/scala/org/apache/comet/CometExpressionSuite.scala:
##########
@@ -113,6 +113,16 @@ class CometExpressionSuite extends CometTestBase with
AdaptiveSparkPlanHelper {
}
}
+ test("Integral Division Overflow Handling Matches Spark Behavior") {
+ withTable("t1") {
+ val value = Long.MinValue
+ sql("create table t1(c1 long, c2 short) using parquet")
+ sql(s"insert into t1 values($value, -1)")
+ val res = sql("select c1 div c2 from t1 order by c1")
+ checkSparkAnswer(res)
Review Comment:
The cast operation to decimal type is falling back to Spark which led me to
make this change given we dont have a comet native cast implementation . Do you
think it is a good idea to implement cast operation in comet and undo the above
changes ?
--
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]