imback82 commented on a change in pull request #31494: URL: https://github.com/apache/spark/pull/31494#discussion_r571342363
########## File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2Strategy.scala ########## @@ -437,9 +437,8 @@ class DataSourceV2Strategy(session: SparkSession) extends Strategy with Predicat }.toSeq AlterTableExec(table.catalog, table.identifier, changes) :: Nil - // TODO: v2 `UNSET TBLPROPERTIES` should respect the ifExists flag. - case AlterTableUnsetProperties(table: ResolvedTable, keys, _) => - val changes = keys.map(key => TableChange.removeProperty(key)) + case AlterTableUnsetProperties(table: ResolvedTable, keys, ifExists) => + val changes = keys.map(key => TableChange.removeProperty(key, ifExists)) Review comment: Another approach is to do the existence check here instead of changing the public APIs. ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org