coderfender commented on code in PR #2136:
URL: https://github.com/apache/datafusion-comet/pull/2136#discussion_r2357393310
##########
spark/src/test/scala/org/apache/comet/CometExpressionSuite.scala:
##########
@@ -394,15 +397,98 @@ class CometExpressionSuite extends CometTestBase with
AdaptiveSparkPlanHelper {
}
}
- test("test coalesce lazy eval") {
- withSQLConf(
- SQLConf.ANSI_ENABLED.key -> "true",
- CometConf.COMET_EXPR_ALLOW_INCOMPATIBLE.key -> "true") {
- val data = Seq((9999999999999L, 0))
- withParquetTable(data, "t1") {
+ test("ANSI support for add") {
Review Comment:
Thank you for the feedback . As discussed on a different thread, Spark's
ANSI arithmetic checks for add , subtract, multiply and divide only support
Integer overflows. I updated code to handle division use case (where operands
are always cast as floats and an error is thrown only if the dividend is 0 )
##########
dev/diffs/3.4.3.diff:
##########
@@ -193,6 +193,18 @@ index 41fd4de2a09..44cd244d3b0 100644
-- Test aggregate operator with codegen on and off.
--CONFIG_DIM1 spark.sql.codegen.wholeStage=true
--CONFIG_DIM1
spark.sql.codegen.wholeStage=false,spark.sql.codegen.factoryMode=CODEGEN_ONLY
+diff --git a/sql/core/src/test/resources/sql-tests/inputs/postgreSQL/int4.sql
b/sql/core/src/test/resources/sql-tests/inputs/postgreSQL/int4.sql
+index 3a409eea348..b0a1fa5c20a 100644
+--- a/sql/core/src/test/resources/sql-tests/inputs/postgreSQL/int4.sql
++++ b/sql/core/src/test/resources/sql-tests/inputs/postgreSQL/int4.sql
+@@ -69,6 +69,7 @@ SELECT '' AS one, i.* FROM INT4_TBL i WHERE (i.f1 %
smallint('2')) = smallint('1
+ -- any evens
+ SELECT '' AS three, i.* FROM INT4_TBL i WHERE (i.f1 % int('2')) =
smallint('0');
+
++--SET spark.comet.exec.enabled=false
Review Comment:
Thank you for the feedback .I added a link to the issue in the SQL file
--
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]