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