SEPURI-SAI-KRISHNA commented on code in PR #59046:
URL: https://github.com/apache/spark/pull/59046#discussion_r4119422121


##########
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:
   I think it's fine as is. `withStatement` opens a new connection for each 
test, and each connection gets its own Spark Connect session that's closed at 
the end, so the conf doesn't leak into other tests. 
`SparkConnectJdbcDataTypeSuite` sets 
`spark.sql.charVarchar.standardSemantics.enabled` the same way without 
unsetting it.



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