Modifier and Type | Method and Description |
---|---|
void |
analyzeCreateView(HiveParserCreateViewInfo createViewInfo,
HiveParserContext context,
HiveParserQueryState queryState) |
HiveParserCalcitePlanner |
createCalcitePlanner(HiveParserContext context,
HiveParserQueryState queryState) |
String[] |
getCompletionHints(String statement,
int cursor)
Returns completion hints for the given statement at the given cursor position.
|
List<Operation> |
parse(String statement)
Entry point for parsing SQL queries expressed as a String.
|
UnresolvedIdentifier |
parseIdentifier(String identifier)
Entry point for parsing SQL identifiers expressed as a String.
|
ResolvedExpression |
parseSqlExpression(String sqlExpression,
RowType inputRowType,
LogicalType outputType)
Entry point for parsing SQL expressions expressed as a String.
|
public List<Operation> parse(String statement)
Parser
Note:If the created Operation
is a QueryOperation
it must be in a
form that will be understood by the Planner.translate(List)
method.
The produced Operation trees should already be validated.
public UnresolvedIdentifier parseIdentifier(String identifier)
Parser
parseIdentifier
in interface Parser
identifier
- the SQL identifier to parsepublic ResolvedExpression parseSqlExpression(String sqlExpression, RowType inputRowType, @Nullable LogicalType outputType)
Parser
parseSqlExpression
in interface Parser
sqlExpression
- the SQL expression to parseinputRowType
- the fields available in the SQL expressionoutputType
- expected top-level output type if availablepublic String[] getCompletionHints(String statement, int cursor)
Parser
getCompletionHints
in interface Parser
statement
- Partial or slightly incorrect SQL statementcursor
- cursor positionpublic HiveParserCalcitePlanner createCalcitePlanner(HiveParserContext context, HiveParserQueryState queryState) throws org.apache.hadoop.hive.ql.parse.SemanticException
org.apache.hadoop.hive.ql.parse.SemanticException
public void analyzeCreateView(HiveParserCreateViewInfo createViewInfo, HiveParserContext context, HiveParserQueryState queryState) throws org.apache.hadoop.hive.ql.parse.SemanticException
org.apache.hadoop.hive.ql.parse.SemanticException
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.