peter-toth commented on code in PR #38034:
URL: https://github.com/apache/spark/pull/38034#discussion_r1071944394
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/trees/TreeNode.scala:
##########
@@ -618,6 +618,212 @@ abstract class TreeNode[BaseType <: TreeNode[BaseType]]
extends Product with Tre
}
}
+ /**
+ * Returns alternative copies of this node where `rule` has been recursively
applied to the tree.
+ *
+ * Users should not expect a specific directionality. If a specific
directionality is needed,
Review Comment:
I've modified the scala docs, let me know if we need more defails or fixes.
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/trees/TreeNode.scala:
##########
@@ -618,6 +618,212 @@ abstract class TreeNode[BaseType <: TreeNode[BaseType]]
extends Product with Tre
}
}
+ /**
+ * Returns alternative copies of this node where `rule` has been recursively
applied to the tree.
+ *
+ * Users should not expect a specific directionality. If a specific
directionality is needed,
+ * multiTransformDownWithPruning or multiTransformUpWithPruning should be
used.
+ *
+ * @param rule a function used to generate transformed alternatives for a
node
+ * @return the stream of alternatives
+ */
+ def multiTransformDown(
+ rule: PartialFunction[BaseType, Stream[BaseType]]): Stream[BaseType] = {
+ multiTransformDownWithPruning(AlwaysProcess.fn, UnknownRuleId)(rule)
+ }
+
+ /**
+ * Returns alternative copies of this node where `rule` has been recursively
applied to the tree.
+ *
+ * Users should not expect a specific directionality. If a specific
directionality is needed,
+ * multiTransformDownWithPruning or multiTransformUpWithPruning should be
used.
Review Comment:
Done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]