MaxGekk commented on a change in pull request #31675:
URL: https://github.com/apache/spark/pull/31675#discussion_r584470889



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/v2Commands.scala
##########
@@ -491,13 +491,10 @@ case class RenameTable(
  */
 case class ShowTables(
     namespace: LogicalPlan,
-    pattern: Option[String],
-    override val output: Seq[Attribute] = ShowTables.OUTPUT) extends Command {
+    pattern: Option[String]) extends Command {
   override def children: Seq[LogicalPlan] = Seq(namespace)
-}
 
-object ShowTables {
-  val OUTPUT = Seq(

Review comment:
       > so that the node won't change its output attr ids during plan 
transformation/copy.
   
   Now, it `output` won't change too.
   
   > What's wrong with the existing approach ...
   
   I have the same question. What's wrong with existing approach before the PR 
https://github.com/apache/spark/pull/31245/, and why you had to introduce 
companion objects like `object ShowTables`?




----------------------------------------------------------------
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to