Class HiveParserTypeCheckProcFactory
- java.lang.Object
-
- org.apache.flink.table.planner.delegation.hive.HiveParserTypeCheckProcFactory
-
- Direct Known Subclasses:
HiveParserJoinCondTypeCheckProcFactory
public class HiveParserTypeCheckProcFactory extends Object
Counterpart of hive's org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory. Add adapted to our needs.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HiveParserTypeCheckProcFactory.BoolExprProcessor
Processor for boolean constants.static class
HiveParserTypeCheckProcFactory.ColumnExprProcessor
Processor for table columns.static class
HiveParserTypeCheckProcFactory.DateTimeExprProcessor
Processor for date constants.static class
HiveParserTypeCheckProcFactory.DefaultExprProcessor
The default processor for typechecking.static class
HiveParserTypeCheckProcFactory.IntervalExprProcessor
Processor for interval constants.static class
HiveParserTypeCheckProcFactory.NullExprProcessor
Processor for processing NULL expression.static class
HiveParserTypeCheckProcFactory.NumExprProcessor
Processor for processing numeric constants.static class
HiveParserTypeCheckProcFactory.StrExprProcessor
Processor for processing string constants.static class
HiveParserTypeCheckProcFactory.SubQueryExprProcessor
Processor for subquery expressions..
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Logger
LOG
-
Constructor Summary
Constructors Modifier Constructor Description protected
HiveParserTypeCheckProcFactory()
-
Method Summary
-
-
-
Method Detail
-
processGByExpr
public static org.apache.hadoop.hive.ql.plan.ExprNodeDesc processGByExpr(org.apache.hadoop.hive.ql.lib.Node nd, Object procCtx) throws org.apache.hadoop.hive.ql.parse.SemanticException
Function to do groupby subexpression elimination. This is called by all the processors initially. As an example, consider the query select a+b, count(1) from T group by a+b; Then a+b is already precomputed in the group by operators key, so we substitute a+b in the select list with the internal column name of the a+b expression that appears in the in input row resolver.- Parameters:
nd
- The node that is being inspected.procCtx
- The processor context.- Returns:
- exprNodeColumnDesc.
- Throws:
org.apache.hadoop.hive.ql.parse.SemanticException
-
genExprNode
public static Map<HiveParserASTNode,org.apache.hadoop.hive.ql.plan.ExprNodeDesc> genExprNode(HiveParserASTNode expr, HiveParserTypeCheckCtx tcCtx) throws org.apache.hadoop.hive.ql.parse.SemanticException
- Throws:
org.apache.hadoop.hive.ql.parse.SemanticException
-
genExprNode
public static Map<HiveParserASTNode,org.apache.hadoop.hive.ql.plan.ExprNodeDesc> genExprNode(HiveParserASTNode expr, HiveParserTypeCheckCtx tcCtx, HiveParserTypeCheckProcFactory tf) throws org.apache.hadoop.hive.ql.parse.SemanticException
- Throws:
org.apache.hadoop.hive.ql.parse.SemanticException
-
getNullExprProcessor
public HiveParserTypeCheckProcFactory.NullExprProcessor getNullExprProcessor()
Factory method to get NullExprProcessor.
-
getNumExprProcessor
public HiveParserTypeCheckProcFactory.NumExprProcessor getNumExprProcessor()
Factory method to get NumExprProcessor.
-
getStrExprProcessor
public HiveParserTypeCheckProcFactory.StrExprProcessor getStrExprProcessor()
Factory method to get StrExprProcessor.
-
getBoolExprProcessor
public HiveParserTypeCheckProcFactory.BoolExprProcessor getBoolExprProcessor()
Factory method to get BoolExprProcessor.
-
getIntervalExprProcessor
public HiveParserTypeCheckProcFactory.IntervalExprProcessor getIntervalExprProcessor()
Factory method to get IntervalExprProcessor.
-
getDateTimeExprProcessor
public HiveParserTypeCheckProcFactory.DateTimeExprProcessor getDateTimeExprProcessor()
Factory method to get DateExprProcessor.
-
getColumnExprProcessor
public HiveParserTypeCheckProcFactory.ColumnExprProcessor getColumnExprProcessor()
Factory method to get ColumnExprProcessor.
-
getDefaultExprProcessor
public HiveParserTypeCheckProcFactory.DefaultExprProcessor getDefaultExprProcessor()
Factory method to get DefaultExprProcessor.
-
getSubQueryExprProcessor
public HiveParserTypeCheckProcFactory.SubQueryExprProcessor getSubQueryExprProcessor()
Factory method to get SubQueryExprProcessor.
-
-