public class BuiltinFunctions extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Console |
console |
protected Exec |
exec |
protected HashMap<String,org.apache.hive.hplsql.functions.FuncCommand> |
map |
protected QueryExecutor |
queryExecutor |
protected HashMap<String,org.apache.hive.hplsql.functions.FuncSpecCommand> |
specMap |
protected HashMap<String,org.apache.hive.hplsql.functions.FuncSpecCommand> |
specSqlMap |
protected boolean |
trace |
| Constructor and Description |
|---|
BuiltinFunctions(Exec exec,
QueryExecutor queryExecutor) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
eval(org.antlr.v4.runtime.ParserRuleContext ctx) |
protected void |
evalDate(Date date) |
protected void |
evalInt(int i) |
protected void |
evalInt(Long i) |
protected void |
evalNull() |
protected void |
evalNullClose(QueryResult query) |
protected Var |
evalPop(org.antlr.v4.runtime.ParserRuleContext ctx) |
protected Var |
evalPop(org.antlr.v4.runtime.ParserRuleContext ctx,
int value) |
protected void |
evalString(String string) |
protected void |
evalString(StringBuilder string) |
protected void |
evalVar(Var var) |
boolean |
exec(String name,
HplsqlParser.Expr_func_paramsContext ctx) |
void |
execCurrentDate(HplsqlParser.Expr_spec_funcContext ctx)
Get the current date
|
void |
execMaxPartDate(HplsqlParser.Expr_spec_funcContext ctx)
Execute MAX_PART_DATE function
|
void |
execMaxPartInt(HplsqlParser.Expr_spec_funcContext ctx)
Execute MAX_PART_INT function
|
void |
execMaxPartString(HplsqlParser.Expr_spec_funcContext ctx)
Execute MAX_PART_STRING function
|
void |
execMinMaxPart(HplsqlParser.Expr_spec_funcContext ctx,
Var.Type type,
boolean max)
Execute MIN or MAX partition function
|
void |
execMinPartDate(HplsqlParser.Expr_spec_funcContext ctx)
Execute MIN_PART_DATE function
|
void |
execMinPartInt(HplsqlParser.Expr_spec_funcContext ctx)
Execute MIN_PART_INT function
|
void |
execMinPartString(HplsqlParser.Expr_spec_funcContext ctx)
Execute MIN_PART_STRING function
|
void |
execPartLoc(HplsqlParser.Expr_spec_funcContext ctx)
Execute PART_LOC function
|
boolean |
exists(String name) |
static int |
getParamCount(HplsqlParser.Expr_func_paramsContext ctx)
Get the number of parameters in function call
|
protected void |
info(org.antlr.v4.runtime.ParserRuleContext ctx,
String message) |
void |
register(BuiltinFunctions f) |
void |
specExec(HplsqlParser.Expr_spec_funcContext ctx)
Execute a special function
|
void |
specExecSql(HplsqlParser.Expr_spec_funcContext ctx)
Execute a special function in executable SQL statement
|
void |
trace(org.antlr.v4.runtime.ParserRuleContext ctx,
String message) |
protected Integer |
visit(org.antlr.v4.runtime.ParserRuleContext ctx) |
protected final Exec exec
protected final Console console
protected boolean trace
protected final QueryExecutor queryExecutor
public BuiltinFunctions(Exec exec, QueryExecutor queryExecutor)
public void register(BuiltinFunctions f)
public boolean exec(String name, HplsqlParser.Expr_func_paramsContext ctx)
public boolean exists(String name)
public void specExec(HplsqlParser.Expr_spec_funcContext ctx)
public void specExecSql(HplsqlParser.Expr_spec_funcContext ctx)
public void execCurrentDate(HplsqlParser.Expr_spec_funcContext ctx)
public void execMaxPartString(HplsqlParser.Expr_spec_funcContext ctx)
public void execMinPartString(HplsqlParser.Expr_spec_funcContext ctx)
public void execMaxPartInt(HplsqlParser.Expr_spec_funcContext ctx)
public void execMinPartInt(HplsqlParser.Expr_spec_funcContext ctx)
public void execMaxPartDate(HplsqlParser.Expr_spec_funcContext ctx)
public void execMinPartDate(HplsqlParser.Expr_spec_funcContext ctx)
public void execMinMaxPart(HplsqlParser.Expr_spec_funcContext ctx, Var.Type type, boolean max)
public void execPartLoc(HplsqlParser.Expr_spec_funcContext ctx)
public void trace(org.antlr.v4.runtime.ParserRuleContext ctx,
String message)
protected void evalNull()
protected void evalString(String string)
protected Var evalPop(org.antlr.v4.runtime.ParserRuleContext ctx)
protected void evalInt(Long i)
protected void evalDate(Date date)
protected void evalNullClose(QueryResult query)
protected void evalVar(Var var)
protected void evalString(StringBuilder string)
protected void evalInt(int i)
protected Var evalPop(org.antlr.v4.runtime.ParserRuleContext ctx, int value)
public static int getParamCount(HplsqlParser.Expr_func_paramsContext ctx)
protected void eval(org.antlr.v4.runtime.ParserRuleContext ctx)
protected Integer visit(org.antlr.v4.runtime.ParserRuleContext ctx)
protected void info(org.antlr.v4.runtime.ParserRuleContext ctx,
String message)
Copyright © 2022 The Apache Software Foundation. All rights reserved.