File tree Expand file tree Collapse file tree 4 files changed +3
-7
lines changed
catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans
core/src/main/scala/org/apache/spark/sql/execution Expand file tree Collapse file tree 4 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ abstract class QueryPlan[PlanType <: TreeNode[PlanType]] extends TreeNode[PlanTy
194194 }
195195
196196 /** Returns all of the expressions present in this query plan operator. */
197- def expressions : Seq [Expression ] = {
197+ final def expressions : Seq [Expression ] = {
198198 // Recursively find all expressions from a traversable.
199199 def seqToExpressions (seq : Traversable [Any ]): Traversable [Expression ] = seq.flatMap {
200200 case e : Expression => e :: Nil
Original file line number Diff line number Diff line change @@ -89,9 +89,7 @@ case class Generate(
8989 generatorOutput.forall(_.resolved)
9090 }
9191
92- // we don't want the gOutput to be taken as part of the expressions
93- // as that will cause exceptions like unresolved attributes etc.
94- override def expressions : Seq [Expression ] = generator :: Nil
92+ override def producedAttributes : AttributeSet = AttributeSet (generatorOutput)
9593
9694 def output : Seq [Attribute ] = {
9795 val qualified = qualifier.map(q =>
Original file line number Diff line number Diff line change @@ -208,8 +208,6 @@ case class CoGroup(
208208 left : LogicalPlan ,
209209 right : LogicalPlan ) extends BinaryNode with ObjectOperator {
210210
211- override def producedAttributes : AttributeSet = outputSet
212-
213211 override def deserializers : Seq [(Expression , Seq [Attribute ])] =
214212 // The `leftGroup` and `rightGroup` are guaranteed te be of same schema, so it's safe to resolve
215213 // the `keyDeserializer` based on either of them, here we pick the left one.
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ case class Generate(
5858 private [sql] override lazy val metrics = Map (
5959 " numOutputRows" -> SQLMetrics .createLongMetric(sparkContext, " number of output rows" ))
6060
61- override def expressions : Seq [ Expression ] = generator :: Nil
61+ override def producedAttributes : AttributeSet = AttributeSet (output)
6262
6363 val boundGenerator = BindReferences .bindReference(generator, child.output)
6464
You can’t perform that action at this time.
0 commit comments