Skip to content

Commit a7383de

Browse files
author
Robert Kruszewski
committed
mapexpressions preserving origin
1 parent 95cf5f7 commit a7383de

File tree

1 file changed

+2
-2
lines changed
  • sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans

1 file changed

+2
-2
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/QueryPlan.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
package org.apache.spark.sql.catalyst.plans
1919

2020
import org.apache.spark.sql.catalyst.expressions._
21-
import org.apache.spark.sql.catalyst.trees.TreeNode
21+
import org.apache.spark.sql.catalyst.trees.{CurrentOrigin, TreeNode}
2222
import org.apache.spark.sql.internal.SQLConf
2323
import org.apache.spark.sql.types.{DataType, StructType}
2424

@@ -122,7 +122,7 @@ abstract class QueryPlan[PlanType <: QueryPlan[PlanType]] extends TreeNode[PlanT
122122
case null => null
123123
}
124124

125-
val newArgs = mapProductIterator(recursiveTransform)
125+
val newArgs = CurrentOrigin.withOrigin(origin) { mapProductIterator(recursiveTransform) }
126126

127127
if (changed) makeCopy(newArgs).asInstanceOf[this.type] else this
128128
}

0 commit comments

Comments
 (0)