org.apache.hadoop.hive.ql.lib
Class RuleRegExp
java.lang.Object
org.apache.hadoop.hive.ql.lib.RuleRegExp
- All Implemented Interfaces:
- Rule
public class RuleRegExp
- extends Object
- implements Rule
Rule interface for Nodes Used in Node dispatching to dispatch process/visitor
functions for Nodes.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RuleRegExp
public RuleRegExp(String ruleName,
String regExp)
- The rule specified by the regular expression. Note that, the regular
expression is specified in terms of Node name. For eg: TS.*RS -> means
TableScan Node followed by anything any number of times followed by
ReduceSink
- Parameters:
ruleName
- name of the ruleregExp
- regular expression for the rule
cost
public int cost(Stack<Node> stack)
throws SemanticException
- This function returns the cost of the rule for the specified stack. Lower
the cost, the better the rule is matched
- Specified by:
cost
in interface Rule
- Parameters:
stack
- Node stack encountered so far
- Returns:
- cost of the function
- Throws:
SemanticException
getName
public String getName()
- Specified by:
getName
in interface Rule
- Returns:
- the name of the Node
Copyright © 2013 The Apache Software Foundation