Package org.teiid.query.eval
Class Evaluator
- java.lang.Object
-
- org.teiid.query.eval.Evaluator
-
- Direct Known Subclasses:
SubqueryAwareEvaluator
public class Evaluator extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Evaluator.NameValuePair<T>
-
Field Summary
Fields Modifier and Type Field Description protected CommandContext
context
protected ProcessorDataManager
dataMgr
protected Map
elements
static char[]
REGEX_RESERVED
static MatchCriteria.PatternTranslator
SIMILAR_TO_REGEX
-
Constructor Summary
Constructors Constructor Description Evaluator(Map elements, ProcessorDataManager dataMgr, CommandContext context)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Boolean
compare(int operator, Object leftValue, Object value)
static boolean
evaluate(Criteria criteria)
boolean
evaluate(Criteria criteria, List<?> tuple)
static Object
evaluate(Expression expression)
Object
evaluate(Expression expression, List<?> tuple)
void
evaluateParameters(List<DerivedColumn> cols, List<?> tuple, Map<String,Object> parameters)
Evaluate the parameters and return the context item if it existsprotected Object
evaluateProcedure(Function function, List<?> tuple, Object[] values)
protected Object
evaluatePushdown(Function function, List<?> tuple, Object[] values)
protected ValueIterator
evaluateSubquery(SubqueryContainer<?> container, List<?> tuple)
Boolean
evaluateTVL(Criteria criteria, List<?> tuple)
static InputStreamFactory
getInputStreamFactory(Streamable<?> s)
void
initialize(CommandContext context, ProcessorDataManager dataMgr)
protected Object
internalEvaluate(Expression expression, List<?> tuple)
static JsonType
jsonArray(CommandContext context, Function f, Object[] vals, JSONFunctionMethods.JSONBuilder builder, Evaluator eval, List<?> tuple)
-
-
-
Field Detail
-
REGEX_RESERVED
public static final char[] REGEX_RESERVED
-
SIMILAR_TO_REGEX
public static final MatchCriteria.PatternTranslator SIMILAR_TO_REGEX
-
elements
protected Map elements
-
dataMgr
protected ProcessorDataManager dataMgr
-
context
protected CommandContext context
-
-
Constructor Detail
-
Evaluator
public Evaluator(Map elements, ProcessorDataManager dataMgr, CommandContext context)
-
-
Method Detail
-
evaluate
public static boolean evaluate(Criteria criteria) throws ExpressionEvaluationException, BlockedException, TeiidComponentException
-
evaluate
public static Object evaluate(Expression expression) throws ExpressionEvaluationException, BlockedException, TeiidComponentException
-
initialize
public void initialize(CommandContext context, ProcessorDataManager dataMgr)
-
evaluate
public boolean evaluate(Criteria criteria, List<?> tuple) throws ExpressionEvaluationException, BlockedException, TeiidComponentException
-
evaluateTVL
public Boolean evaluateTVL(Criteria criteria, List<?> tuple) throws ExpressionEvaluationException, BlockedException, TeiidComponentException
-
compare
public static Boolean compare(int operator, Object leftValue, Object value) throws AssertionError
- Throws:
AssertionError
-
evaluate
public Object evaluate(Expression expression, List<?> tuple) throws ExpressionEvaluationException, BlockedException, TeiidComponentException
-
internalEvaluate
protected Object internalEvaluate(Expression expression, List<?> tuple) throws ExpressionEvaluationException, BlockedException, TeiidComponentException
-
getInputStreamFactory
public static InputStreamFactory getInputStreamFactory(Streamable<?> s)
-
jsonArray
public static JsonType jsonArray(CommandContext context, Function f, Object[] vals, JSONFunctionMethods.JSONBuilder builder, Evaluator eval, List<?> tuple) throws TeiidProcessingException, BlockedException, TeiidComponentException
-
evaluateParameters
public void evaluateParameters(List<DerivedColumn> cols, List<?> tuple, Map<String,Object> parameters) throws ExpressionEvaluationException, BlockedException, TeiidComponentException
Evaluate the parameters and return the context item if it exists
-
evaluatePushdown
protected Object evaluatePushdown(Function function, List<?> tuple, Object[] values) throws FunctionExecutionException, TeiidComponentException, TeiidProcessingException
-
evaluateSubquery
protected ValueIterator evaluateSubquery(SubqueryContainer<?> container, List<?> tuple) throws TeiidProcessingException, BlockedException, TeiidComponentException
- Parameters:
container
-tuple
-- Returns:
- Throws:
TeiidProcessingException
BlockedException
TeiidComponentException
-
evaluateProcedure
protected Object evaluateProcedure(Function function, List<?> tuple, Object[] values) throws TeiidComponentException, TeiidProcessingException
-
-