coderfender commented on code in PR #2136:
URL: https://github.com/apache/datafusion-comet/pull/2136#discussion_r2353157160


##########
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:
   Great question. This is one of the tests where the expectation is a spark 
based overflow exception . Given that the execution for ANSI mode is on comet's 
side, we cant match the stacktrace the test's output is looking for and hence 
the config update to disable comet.  
   For reference , the expected error message in `int4.sql.out` is :
    
   ```
   -- !query
   SELECT '' AS five, i.f1, i.f1 * smallint('2') AS x FROM INT4_TBL i
   -- !query schema
   struct<>
   -- !query output
   org.apache.spark.SparkArithmeticException
   {
     "errorClass" : "ARITHMETIC_OVERFLOW",
     "sqlState" : "22003",
     "messageParameters" : {
       "alternative" : " Use 'try_multiply' to tolerate overflow and return 
NULL instead.",
       "config" : "\"spark.sql.ansi.enabled\"",
       "message" : "integer overflow"
     },
     "queryContext" : [ {
       "objectType" : "",
       "objectName" : "",
       "startIndex" : 26,
       "stopIndex" : 45,
       "fragment" : "i.f1 * smallint('2')"
     } ]
   }
   
   ```



-- 
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]

Reply via email to