Package com.arcadedb.query.sql.parser
Class FunctionCall
- java.lang.Object
-
- com.arcadedb.query.sql.parser.SimpleNode
-
- com.arcadedb.query.sql.parser.FunctionCall
-
- All Implemented Interfaces:
Node
public class FunctionCall extends SimpleNode
-
-
Field Summary
Fields Modifier and Type Field Description protected Identifier
name
protected List<Expression>
params
-
Fields inherited from class com.arcadedb.query.sql.parser.SimpleNode
children, firstToken, id, lastToken, parent, parser, value
-
-
Constructor Summary
Constructors Constructor Description FunctionCall(int id)
FunctionCall(SqlParser p, int id)
-
Method Summary
-
Methods inherited from class com.arcadedb.query.sql.parser.SimpleNode
childrenAccept, dump, getValue, jjtAccept, jjtAddChild, jjtClose, jjtGetChild, jjtGetFirstToken, jjtGetLastToken, jjtGetNumChildren, jjtGetParent, jjtGetValue, jjtOpen, jjtSetFirstToken, jjtSetLastToken, jjtSetParent, jjtSetValue, toString, toString
-
-
-
-
Field Detail
-
name
protected Identifier name
-
params
protected List<Expression> params
-
-
Constructor Detail
-
FunctionCall
public FunctionCall(int id)
-
FunctionCall
public FunctionCall(SqlParser p, int id)
-
-
Method Detail
-
getDatabase
public static Database getDatabase()
-
isStar
public boolean isStar()
-
getParams
public List<Expression> getParams()
-
setParams
public void setParams(List<Expression> params)
-
toString
public void toString(Map<String,Object> params, StringBuilder builder)
- Overrides:
toString
in classSimpleNode
-
execute
public Object execute(Object targetObjects, CommandContext ctx)
-
isIndexedFunctionCall
public boolean isIndexedFunctionCall()
-
executeIndexedFunction
public Iterable<Record> executeIndexedFunction(FromClause target, CommandContext ctx, BinaryCompareOperator operator, Object rightValue)
see OIndexableSQLFunction.searchFromTarget()- Parameters:
target
-ctx
-operator
-rightValue
-- Returns:
-
estimateIndexedFunction
public long estimateIndexedFunction(FromClause target, CommandContext ctx, BinaryCompareOperator operator, Object rightValue)
- Parameters:
target
- query targetctx
- execution contextoperator
- operator at the right of the functionrightValue
- value to compare to funciton result- Returns:
- the approximate number of items returned by the condition execution, -1 if the extimation cannot be executed
-
canExecuteIndexedFunctionWithoutIndex
public boolean canExecuteIndexedFunctionWithoutIndex(FromClause target, CommandContext context, BinaryCompareOperator operator, Object right)
tests if current function is an indexed function AND that function can also be executed without using the index- Parameters:
target
- the query targetcontext
- the execution contextoperator
-right
-- Returns:
- true if current function is an indexed funciton AND that function can also be executed without using the index, false otherwise
-
allowsIndexedFunctionExecutionOnTarget
public boolean allowsIndexedFunctionExecutionOnTarget(FromClause target, CommandContext context, BinaryCompareOperator operator, Object right)
tests if current function is an indexed function AND that function can be used on this target- Parameters:
target
- the query targetcontext
- the execution contextoperator
-right
-- Returns:
- true if current function is an indexed function AND that function can be used on this target, false otherwise
-
executeIndexedFunctionAfterIndexSearch
public boolean executeIndexedFunctionAfterIndexSearch(FromClause target, CommandContext context, BinaryCompareOperator operator, Object right)
tests if current expression is an indexed function AND the function has also to be executed after the index search. In some cases, the index search is accurate, so this condition can be excluded from further evaluation. In other cases the result from the index is a superset of the expected result, so the function has to be executed anyway for further filtering- Parameters:
target
- the query targetcontext
- the execution context- Returns:
- true if current expression is an indexed function AND the function has also to be executed after the index search.
-
isExpand
public boolean isExpand()
-
isAggregate
public boolean isAggregate()
-
splitForAggregation
public SimpleNode splitForAggregation(AggregateProjectionSplit aggregateProj)
-
isEarlyCalculated
public boolean isEarlyCalculated()
-
getAggregationContext
public AggregationContext getAggregationContext(CommandContext ctx)
-
copy
public FunctionCall copy()
- Overrides:
copy
in classSimpleNode
-
refersToParent
public boolean refersToParent()
-
getName
public Identifier getName()
-
toMethod
public MethodCall toMethod()
-
serialize
public Result serialize()
-
deserialize
public void deserialize(Result fromResult)
-
extractSubQueries
public void extractSubQueries(Identifier letAlias, SubQueryCollector collector)
-
extractSubQueries
public void extractSubQueries(SubQueryCollector collector)
-
isCacheable
public boolean isCacheable()
-
-