szehon-ho commented on code in PR #51092:
URL: https://github.com/apache/spark/pull/51092#discussion_r2129950451
##########
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:
Hm it didnt work, i think this goes to another sparkconf that's not used by
this suite? I guess that's why there's a separate before to override the conf,
i put it there.
--
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]