allisonwang-db commented on code in PR #50109: URL: https://github.com/apache/spark/pull/50109#discussion_r1982287527
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/v2Commands.scala: ########## @@ -1664,3 +1664,22 @@ case class Call( override protected def withNewChildInternal(newChild: LogicalPlan): Call = copy(procedure = newChild) } + +/** + * The logical plan of the SHOW PROCEDURES command. + */ +case class ShowProcedures( + namespace: LogicalPlan, + pattern: Option[String], + override val output: Seq[Attribute] = ShowProcedures.getOutputAttrs) extends UnaryCommand { Review Comment: nit ```suggestion namespace: LogicalPlan, pattern: Option[String], override val output: Seq[Attribute] = ShowProcedures.getOutputAttrs) extends UnaryCommand { ``` ########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/v2Commands.scala: ########## @@ -1664,3 +1664,22 @@ case class Call( override protected def withNewChildInternal(newChild: LogicalPlan): Call = copy(procedure = newChild) } + +/** + * The logical plan of the SHOW PROCEDURES command. + */ +case class ShowProcedures( + namespace: LogicalPlan, + pattern: Option[String], + override val output: Seq[Attribute] = ShowProcedures.getOutputAttrs) extends UnaryCommand { + override def child: LogicalPlan = namespace + + override protected def withNewChildInternal(newChild: LogicalPlan): ShowProcedures = + copy(namespace = newChild) +} + +object ShowProcedures { + def getOutputAttrs: Seq[Attribute] = Seq( + AttributeReference("namespace", StringType, nullable = false)(), + AttributeReference("name", StringType, nullable = false)()) Review Comment: Shall we use `procedureName` here? -- 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: reviews-unsubscr...@spark.apache.org 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