Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/20999#discussion_r225073862
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/namedExpressions.scala
---
@@ -382,6 +382,30 @@ case class OuterReference(e: NamedExpression)
override def newInstance(): NamedExpression =
OuterReference(e.newInstance())
}
+/**
+ * A place holder used to hold the name of the partition attributes
specified when running commands
+ * involving partitions, eg. ALTER TABLE ... DROP PARTITIONS.
+ */
+case class PartitioningAttribute(name: String)
+ extends Attribute with Unevaluable {
+ override val exprId: ExprId = NamedExpression.newExprId
--- End diff --
even it's a fake attribute, we should not change the `exprId` when this
expression gets copied. Can we move `exprId` to the constructor?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]