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/03/01 05:26:51 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #31676: [SPARK-34561][SQL] Fix drop/add columns from/to a dataset of v2 `DESCRIBE TABLE`

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



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/v2Commands.scala
##########
@@ -347,7 +347,7 @@ case class DescribeRelation(
     partitionSpec: TablePartitionSpec,
     isExtended: Boolean) extends Command {
   override def children: Seq[LogicalPlan] = Seq(relation)
-  override def output: Seq[Attribute] = DescribeCommandSchema.describeTableAttributes()
+  override val output: Seq[Attribute] = DescribeCommandSchema.describeTableAttributes()

Review comment:
       Shall we follow others like `ShowTables` and put the `output` as a parameter? Then it's more stable and the output won't after copy/transformation.

##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/v2Commands.scala
##########
@@ -347,7 +347,7 @@ case class DescribeRelation(
     partitionSpec: TablePartitionSpec,
     isExtended: Boolean) extends Command {
   override def children: Seq[LogicalPlan] = Seq(relation)
-  override def output: Seq[Attribute] = DescribeCommandSchema.describeTableAttributes()
+  override val output: Seq[Attribute] = DescribeCommandSchema.describeTableAttributes()

Review comment:
       Shall we follow others like `ShowTables` and put the `output` as a parameter? Then it's more stable and the output won't change after copy/transformation.




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