cloud-fan commented on code in PR #51092:
URL: https://github.com/apache/spark/pull/51092#discussion_r2129417988


##########
sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2DataFrameSuite.scala:
##########
@@ -676,104 +676,107 @@ class DataSourceV2DataFrameSuite
 
   test("create/replace table default value expression should have a cast") {
     val tableName = "testcat.ns1.ns2.tbl"
-    withTable(tableName) {
-
-      val createExec = executeAndKeepPhysicalPlan[CreateTableExec] {
-        sql(
-          s"""
-             |CREATE TABLE $tableName (
-             |  col1 int,
-             |  col2 timestamp DEFAULT '2018-11-17 13:33:33',
-             |  col3 double DEFAULT 1)
-             |""".stripMargin)
-      }
-      checkDefaultValues(
-        createExec.columns,
-        Array(
-          null,
-          new ColumnDefaultValue(
-            "'2018-11-17 13:33:33'",
-            new LiteralValue(1542490413000000L, TimestampType),
-            new LiteralValue(1542490413000000L, TimestampType)),
-          new ColumnDefaultValue(
-            "1",
-            new V2Cast(LiteralValue(1, IntegerType), IntegerType, DoubleType),
-            LiteralValue(1.0, DoubleType))))
+    withSQLConf(SQLConf.ANSI_ENABLED.key -> "true") {

Review Comment:
   to avoid similar issues in the future, can we turn on ANSI for the entire 
test suite? we can override `def sparkConf` like 
https://github.com/apache/spark/blob/master/sql/core/src/test/scala/org/apache/spark/sql/TPCDSQuerySuite.scala#L32



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