From 1d0022474554ceec585146a63e29fce775c5ea9f Mon Sep 17 00:00:00 2001 From: Hyukjin Kwon Date: Mon, 31 Oct 2022 12:59:32 +0900 Subject: [PATCH] Disable ANSI mode in v2 ALTER TABLE PARTITION test --- .../execution/command/v2/AlterTableAddPartitionSuite.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/AlterTableAddPartitionSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/AlterTableAddPartitionSuite.scala index a9ab11e483fd7..c33d9b0101a7a 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/AlterTableAddPartitionSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/AlterTableAddPartitionSuite.scala @@ -129,7 +129,9 @@ class AlterTableAddPartitionSuite withNamespaceAndTable("ns", "tbl") { t => sql(s"CREATE TABLE $t (c int) $defaultUsing PARTITIONED BY (p int)") - withSQLConf(SQLConf.SKIP_TYPE_VALIDATION_ON_ALTER_PARTITION.key -> "true") { + withSQLConf( + SQLConf.SKIP_TYPE_VALIDATION_ON_ALTER_PARTITION.key -> "true", + SQLConf.ANSI_ENABLED.key -> "false") { sql(s"ALTER TABLE $t ADD PARTITION (p='aaa')") checkPartitions(t, Map("p" -> defaultPartitionName)) sql(s"ALTER TABLE $t DROP PARTITION (p=null)")