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]] {
187
187
} else {
188
188
arg
189
189
}
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
+ }
190
198
case m : Map [_,_] => m
191
199
case args : Traversable [_] => args.map {
192
200
case arg : TreeNode [_] if children contains arg =>
@@ -231,6 +239,14 @@ abstract class TreeNode[BaseType <: TreeNode[BaseType]] {
231
239
} else {
232
240
arg
233
241
}
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
+ }
234
250
case m : Map [_,_] => m
235
251
case args : Traversable [_] => args.map {
236
252
case arg : TreeNode [_] if children contains arg =>
You can’t perform that action at this time.
0 commit comments