andygrove commented on code in PR #1996: URL: https://github.com/apache/datafusion-comet/pull/1996#discussion_r2197874159
########## spark/src/test/scala/org/apache/comet/CometExpressionSuite.scala: ########## @@ -2744,6 +2744,16 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper { } } + test("Integral Division Overflow Handling Matches Spark Behavior") { + withTable("t1") { + val value = Long.MinValue + sql(s"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") + checkAnswer(res, Row(9223372036854775807L) :: Nil) Review Comment: The current test does not assert that the query ran natively in Comet. Could you use `checkSparkAnswerAndOperator` instead? This will check that Spark and Comet produce the same result and will assert that the query runs in Comet. ```suggestion checkSparkAnswerAndOperator(res) ``` -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org