public static class HiveQl.TransformableNode
extends Object
catalyst.trees.TreeNode
.
Note that this should be considered very experimental and is not indented as a replacement for TreeNode. Primarily it should be noted ASTNodes are not immutable and do not appear to have clean copy semantics. Therefore, users of this class should take care when copying/modifying trees that might be used elsewhere.
Constructor and Description |
---|
HiveQl.TransformableNode(org.apache.hadoop.hive.ql.parse.ASTNode n) |
Modifier and Type | Method and Description |
---|---|
void |
checkEquals(org.apache.hadoop.hive.ql.parse.ASTNode other)
Throws an error if this is not equal to other.
|
org.apache.hadoop.hive.ql.parse.ASTNode |
transform(scala.PartialFunction<org.apache.hadoop.hive.ql.parse.ASTNode,org.apache.hadoop.hive.ql.parse.ASTNode> rule)
Returns a copy of this node where
rule has been recursively applied to it and all of its
children. |
org.apache.hadoop.hive.ql.parse.ASTNode |
withChildren(scala.collection.Seq<org.apache.hadoop.hive.ql.parse.ASTNode> newChildren)
Returns this ASTNode with the children changed to
newChildren . |
org.apache.hadoop.hive.ql.parse.ASTNode |
withText(String newText)
Returns this ASTNode with the text changed to
newText . |
public HiveQl.TransformableNode(org.apache.hadoop.hive.ql.parse.ASTNode n)
public org.apache.hadoop.hive.ql.parse.ASTNode transform(scala.PartialFunction<org.apache.hadoop.hive.ql.parse.ASTNode,org.apache.hadoop.hive.ql.parse.ASTNode> rule)
rule
has been recursively applied to it and all of its
children. When rule
does not apply to a given node it is left unchanged.rule
- the function use to transform this nodes childrenpublic org.apache.hadoop.hive.ql.parse.ASTNode withText(String newText)
newText
.public org.apache.hadoop.hive.ql.parse.ASTNode withChildren(scala.collection.Seq<org.apache.hadoop.hive.ql.parse.ASTNode> newChildren)
newChildren
.public void checkEquals(org.apache.hadoop.hive.ql.parse.ASTNode other)
Right now this function only checks the name, type, text and children of the node for equality.