You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/02/04 14:30:27 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #31474: [SPARK-34359][SQL] add a legacy config to restore the output schema of SHOW DATABASES

cloud-fan commented on a change in pull request #31474:
URL: https://github.com/apache/spark/pull/31474#discussion_r570267617



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/v2Commands.scala
##########
@@ -325,11 +325,13 @@ case class AlterNamespaceSetLocation(
  */
 case class ShowNamespaces(
     namespace: LogicalPlan,
-    pattern: Option[String]) extends Command {
+    pattern: Option[String],
+    override val output: Seq[Attribute] = ShowNamespaces.OUTPUT) extends Command {

Review comment:
       I think it's better to put the `output` field in the constructor so that it's more stable (copying the node will not regenerate the output attributes). It also helps if we want to support self-join later.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org