public class CeilParseNode extends FunctionParseNode
CeilFunction
.
It also acts as a factory for creating the right kind of
ceil expression according to the data type of the
first child.FunctionParseNode.Argument, FunctionParseNode.BuiltInFunction, FunctionParseNode.BuiltInFunctionArgInfo, FunctionParseNode.BuiltInFunctionInfo, FunctionParseNode.FunctionClassType
Modifier and Type | Method and Description |
---|---|
Expression |
create(List<Expression> children,
StatementContext context)
Entry point for parser to instantiate compiled representation of built-in function
|
boolean |
evalToNullIfParamIsNull(StatementContext context,
int index)
When ceiling off decimals, user need not specify the scale.
|
static Expression |
getCeilExpression(List<Expression> children) |
accept, create, equals, getInfo, getName, hashCode, isAggregate, toSQL, validate, validateFunctionArguement
getChildren, isStateless
getAlias, hasSubquery, toString
public Expression create(List<Expression> children, StatementContext context) throws SQLException
FunctionParseNode
create
in class FunctionParseNode
children
- Compiled expressions for child nodescontext
- Query context for accessing state shared across the processing of multiple clausesSQLException
public static Expression getCeilExpression(List<Expression> children) throws SQLException
SQLException
public boolean evalToNullIfParamIsNull(StatementContext context, int index) throws SQLException
FunctionParseNode.BuiltInFunctionInfo
provided a
way of associating default values for each permissible data type.
Something like: @ Argument(allowedTypes={PDataType.VARCHAR, PDataType.INTEGER}, defaultValues = {"null", "1"} isConstant=true)
Till then, this will have to do.evalToNullIfParamIsNull
in class FunctionParseNode
index
- index of parameterSQLException
Copyright © 2019 Apache Software Foundation. All Rights Reserved.