MaxGekk commented on pull request #30866:
URL: https://github.com/apache/spark/pull/30866#issuecomment-748812929


   > So, do you propose a behavior change from AnalysisException .. to 
PartitionAlreadyExistsException
   
   Yes, I do. This will be consistent with In-Memory catalog: 
https://github.com/apache/spark/blob/3a299aa6480ac22501512cd0310d31a441d7dfdc/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/InMemoryCatalog.scala#L474
   ```
     private def requirePartitionsNotExist(
         db: String,
         table: String,
         specs: Seq[TablePartitionSpec]): Unit = {
       specs.foreach { s =>
         if (partitionExists(db, table, s)) {
           throw new PartitionAlreadyExistsException(db = db, table = table, 
spec = s)
         }
       }
     }
   ```
   
   > Do you think we need a migration document, @MaxGekk ?
   
   As you mentioned `PartitionAlreadyExistsException` is a sub-class of 
`AnalysisException`, so, if users expect `AnalysisException`, we will not break 
their code. In any case, we could update the SQL migration guide... but if we 
do that for the current changes, we should update the guide for: 
https://github.com/apache/spark/pull/30778 and 
https://github.com/apache/spark/pull/30711


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