NarekDW commented on code in PR #41018:
URL: https://github.com/apache/spark/pull/41018#discussion_r1182810488
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala:
##########
@@ -333,10 +333,11 @@ case class AlterTableUnsetPropertiesCommand(
val catalog = sparkSession.sessionState.catalog
val table = catalog.getTableRawMetadata(tableName)
if (!ifExists) {
- propKeys.foreach { k =>
- if (!table.properties.contains(k) && k != TableCatalog.PROP_COMMENT) {
- throw QueryCompilationErrors.unsetNonExistentPropertyError(k,
table.identifier)
- }
+ val nonexistentKeys = propKeys.filter(key =>
!table.properties.contains(key)
Review Comment:
I think instead of printing the first nonexistent property in the error
message, it is better to collect all the properties which are not existent and
print them all.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]