File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/trees Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -187,6 +187,14 @@ abstract class TreeNode[BaseType <: TreeNode[BaseType]] {
187187 } else {
188188 arg
189189 }
190+ case Some (arg : TreeNode [_]) if children contains arg =>
191+ val newChild = arg.asInstanceOf [BaseType ].transformDown(rule)
192+ if (! (newChild fastEquals arg)) {
193+ changed = true
194+ Some (newChild)
195+ } else {
196+ Some (arg)
197+ }
190198 case m : Map [_,_] => m
191199 case args : Traversable [_] => args.map {
192200 case arg : TreeNode [_] if children contains arg =>
@@ -231,6 +239,14 @@ abstract class TreeNode[BaseType <: TreeNode[BaseType]] {
231239 } else {
232240 arg
233241 }
242+ case Some (arg : TreeNode [_]) if children contains arg =>
243+ val newChild = arg.asInstanceOf [BaseType ].transformUp(rule)
244+ if (! (newChild fastEquals arg)) {
245+ changed = true
246+ Some (newChild)
247+ } else {
248+ Some (arg)
249+ }
234250 case m : Map [_,_] => m
235251 case args : Traversable [_] => args.map {
236252 case arg : TreeNode [_] if children contains arg =>
You can’t perform that action at this time.
0 commit comments