Class ExpressionContext
- java.lang.Object
-
- org.apache.pinot.common.request.context.ExpressionContext
-
public class ExpressionContext extends Object
TheExpressionContextclass represents an expression in the query.The expression can be a LITERAL (e.g. 1, "abc"), an IDENTIFIER (e.g. memberId, timestamp), or a FUNCTION (e.g. SUM(price), ADD(foo, bar)).
Currently the query engine processes all literals as strings, so we store literals in string format (1 is stored as "1").
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classExpressionContext.Type
-
Method Summary
Modifier and Type Method Description booleanequals(Object o)static ExpressionContextforFunction(FunctionContext function)static ExpressionContextforIdentifier(String identifier)static ExpressionContextforLiteralContext(Literal literal)static ExpressionContextforLiteralContext(FieldSpec.DataType type, Object val)voidgetColumns(Set<String> columns)Adds the columns (IDENTIFIER expressions) in the expression to the given set.FunctionContextgetFunction()StringgetIdentifier()LiteralContextgetLiteral()StringgetLiteralString()Deprecated.ExpressionContext.TypegetType()inthashCode()StringtoString()
-
-
-
Method Detail
-
forLiteralContext
public static ExpressionContext forLiteralContext(Literal literal)
-
forLiteralContext
public static ExpressionContext forLiteralContext(FieldSpec.DataType type, Object val)
-
forIdentifier
public static ExpressionContext forIdentifier(String identifier)
-
forFunction
public static ExpressionContext forFunction(FunctionContext function)
-
getLiteralString
@Deprecated public String getLiteralString()
Deprecated.
-
getType
public ExpressionContext.Type getType()
-
getLiteral
public LiteralContext getLiteral()
-
getIdentifier
public String getIdentifier()
-
getFunction
public FunctionContext getFunction()
-
getColumns
public void getColumns(Set<String> columns)
Adds the columns (IDENTIFIER expressions) in the expression to the given set.
-
-