SEPURI-SAI-KRISHNA commented on code in PR #59046:
URL: https://github.com/apache/spark/pull/59046#discussion_r4118346456
##########
sql/connect/client/jdbc/src/test/scala/org/apache/spark/sql/connect/client/jdbc/SparkConnectResultSetSuite.scala:
##########
@@ -191,11 +191,14 @@ class SparkConnectResultSetSuite extends ConnectFunSuite
with RemoteSparkSession
// The server sends the schema response before any arrow batch, so
executeQuery
// returns successfully and the runtime error surfaces while iterating
rows.
withStatement { stmt =>
+ // Division by zero only fails under ANSI mode, so enable it explicitly
for this session
+ // instead of relying on the default, which is off when
SPARK_ANSI_SQL_MODE=false.
+ stmt.execute("SET spark.sql.ansi.enabled=true")
Review Comment:
It is by default, but the default depends on `SPARK_ANSI_SQL_MODE`
([SQLConf](https://github.com/apache/spark/blob/eb6c7056ecbeb5442ae875a341dacad7d990cfd8/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala#L6011)),
and the scheduled Non-ANSI build sets it to `false`. There `10 / 0` returns
NULL, so this test has failed in every Non-ANSI run since it was added, e.g.
https://github.com/apache/spark/actions/runs/36285695555/job/108529147400
--
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]