imback82 commented on a change in pull request #30881: URL: https://github.com/apache/spark/pull/30881#discussion_r548272691
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/v2Commands.scala ########## @@ -344,10 +344,11 @@ case class DescribeRelation( */ case class DescribeColumn( relation: LogicalPlan, - colNameParts: Seq[String], + column: NamedExpression, isExtended: Boolean) extends Command { override def children: Seq[LogicalPlan] = Seq(relation) override def output: Seq[Attribute] = DescribeCommandSchema.describeColumnAttributes() + override lazy val references: AttributeSet = AttributeSet.empty Review comment: This is one possible implementation of `inputSet` here: ```scala override lazy val inputSet: AttributeSet = { val output = relation match { case r: ResolvedTable => r.table.schema.toAttributes // creates new AttributeReference case _ => Seq() // should assert } AttributeSet(output) } ``` However, when `DescribeColumn` case class is copied in `ResolveAttribute` (`r.copy(column = resolvedCol)`), new `AttributeReference`s are created since `toAttributes` is called. Any idea on the workaround (without updating `ResolvedTable` to have `output`)? ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org