MaxGekk commented on a change in pull request #30538:
URL: https://github.com/apache/spark/pull/30538#discussion_r552946827
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableDropPartitionSuiteBase.scala
##########
@@ -144,4 +145,14 @@ trait AlterTableDropPartitionSuiteBase extends QueryTest
with DDLCommandTestUtil
checkPartitions(t)
}
}
+
+ test("SPARK-33591: null as a partition value") {
+ withNamespaceAndTable("ns", "tbl") { t =>
+ sql(s"CREATE TABLE $t (col1 INT, p1 STRING) $defaultUsing PARTITIONED BY
(p1)")
+ sql(s"ALTER TABLE $t ADD PARTITION (p1 = null)")
Review comment:
> don't we have a check to fail null partition value for ADD PARTITION
with hive catalog
For hive catalog, we convert `null` to `DEFAULT_PARTITION_NAME` by
`ExternalCatalogUtils.convertNullPartitionValues` from
`toMetaStorePartitionSpec`. The last one is invoked in all functions in
`HiveExternalCatalog` that makes deal with partition specs.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]