imback82 commented on a change in pull request #26176: [SPARK-29519][SQL] SHOW
TBLPROPERTIES should do multi-catalog resolution.
URL: https://github.com/apache/spark/pull/26176#discussion_r336780087
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
##########
@@ -2728,4 +2728,20 @@ class AstBuilder(conf: SQLConf) extends
SqlBaseBaseVisitor[AnyRef] with Logging
override def visitRepairTable(ctx: RepairTableContext): LogicalPlan =
withOrigin(ctx) {
RepairTableStatement(visitMultipartIdentifier(ctx.multipartIdentifier()))
}
+
+ /**
+ * A command for users to list the properties for a table. If propertyKey is
specified, the value
+ * for the propertyKey is returned. If propertyKey is not specified, all the
keys and their
+ * corresponding values are returned.
+ * The syntax of using this command in SQL is:
+ * {{{
+ * SHOW TBLPROPERTIES table_name[('propertyKey')];
+ * }}}
+ */
+ override def visitShowTblProperties(
+ ctx: ShowTblPropertiesContext): LogicalPlan = withOrigin(ctx) {
+ ShowTablePropertiesStatement(
+ visitMultipartIdentifier(ctx.multipartIdentifier()),
Review comment:
`ctx.table` since the alias is available? I am not sure what the preferred
way is, and for commands like `ALTER TABLE`, we haven't used the alias `table`
in `SqlBase.g4`. @cloud-fan can confirm.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]