yaooqinn commented on a change in pull request #26847: [SPARK-30214][SQL] A new framework to resolve v2 commands URL: https://github.com/apache/spark/pull/26847#discussion_r361654734
########## File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2Strategy.scala ########## @@ -210,6 +212,19 @@ object DataSourceV2Strategy extends Strategy with PredicateHelper { case AlterNamespaceSetProperties(catalog, namespace, properties) => AlterNamespaceSetPropertiesExec(catalog, namespace, properties) :: Nil + case CommentOnNamespace(ResolvedNamespace(catalog, namespace), comment) => + AlterNamespaceSetPropertiesExec( + catalog, + namespace, + Map(SupportsNamespaces.PROP_COMMENT -> comment)) :: Nil + + case CommentOnTable(plan, comment) => plan match { + case ResolvedTable(catalog, identifier, _) => + val changes = TableChange.setProperty(TableCatalog.PROP_COMMENT, comment) + AlterTableExec(catalog, identifier, Seq(changes)) :: Nil + case _ => throw new AnalysisException("COMMENT ON TABLE does not support views.") Review comment: ah. i missed that comment ---------------------------------------------------------------- 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 With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org