MaxGekk commented on a change in pull request #30538:
URL: https://github.com/apache/spark/pull/30538#discussion_r552945126



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/ExternalCatalogUtils.scala
##########
@@ -169,9 +169,15 @@ object ExternalCatalogUtils {
       spec1: TablePartitionSpec,
       spec2: TablePartitionSpec): Boolean = {
     spec1.forall {
+      case (partitionColumn, null | DEFAULT_PARTITION_NAME) =>

Review comment:
       > Can we add a util function isInvalidPartitionValue?
   
   1. Why are partition values invalid? They are still valid here
   2. Where else will the function be used. Since this is only the place, 
wouldn't be better to keep the code embedded here?
   
   > will we hit empty string partition value here?
   
   Empty string is handling earlier. We cannot have it here. For example, 
`SessionCatalog.createPartitions` -> `requireNonEmptyValueInPartitionSpec` 
which is called before `externalCatalog.createPartitions` where we convert 
`null` to `__HIVE_DEFAULT_PARTITION__`.




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

Reply via email to