Package org.apache.drill.exec.expr
Class ExpressionTreeMaterializer
java.lang.Object
org.apache.drill.exec.expr.ExpressionTreeMaterializer
-
Method Summary
Modifier and TypeMethodDescriptionstatic LogicalExpression
addCastExpression
(LogicalExpression fromExpr, TypeProtos.MajorType toType, FunctionLookupContext functionLookupContext, ErrorCollector errorCollector) static LogicalExpression
addCastExpression
(LogicalExpression fromExpr, TypeProtos.MajorType toType, FunctionLookupContext functionLookupContext, ErrorCollector errorCollector, boolean exactResolver) static LogicalExpression
convertToNullableType
(LogicalExpression fromExpr, TypeProtos.MinorType toType, FunctionLookupContext functionLookupContext, ErrorCollector errorCollector) static LogicalExpression
materialize
(LogicalExpression expr, Map<VectorAccessible, BatchReference> batches, ErrorCollector errorCollector, FunctionLookupContext functionLookupContext, boolean allowComplexWriterExpr, boolean unionTypeEnabled) Materializes logical expression taking into account passed parameters.static LogicalExpression
materialize
(LogicalExpression expr, VectorAccessible batch, ErrorCollector errorCollector, FunctionLookupContext functionLookupContext) static LogicalExpression
materialize
(LogicalExpression expr, VectorAccessible batch, ErrorCollector errorCollector, FunctionLookupContext functionLookupContext, boolean allowComplexWriterExpr) static LogicalExpression
materialize
(LogicalExpression expr, VectorAccessible batch, ErrorCollector errorCollector, FunctionLookupContext functionLookupContext, boolean allowComplexWriterExpr, boolean unionTypeEnabled) Materializes logical expression taking into account passed parameters.static LogicalExpression
materializeAndCheckErrors
(LogicalExpression expr, VectorAccessible batch, FunctionLookupContext functionLookupContext) static LogicalExpression
materializeFilterExpr
(LogicalExpression expr, TupleMetadata fieldTypes, ErrorCollector errorCollector, FunctionLookupContext functionLookupContext)
-
Method Details
-
materialize
public static LogicalExpression materialize(LogicalExpression expr, VectorAccessible batch, ErrorCollector errorCollector, FunctionLookupContext functionLookupContext) -
materializeAndCheckErrors
public static LogicalExpression materializeAndCheckErrors(LogicalExpression expr, VectorAccessible batch, FunctionLookupContext functionLookupContext) -
materialize
public static LogicalExpression materialize(LogicalExpression expr, VectorAccessible batch, ErrorCollector errorCollector, FunctionLookupContext functionLookupContext, boolean allowComplexWriterExpr) -
materializeFilterExpr
public static LogicalExpression materializeFilterExpr(LogicalExpression expr, TupleMetadata fieldTypes, ErrorCollector errorCollector, FunctionLookupContext functionLookupContext) -
materialize
public static LogicalExpression materialize(LogicalExpression expr, VectorAccessible batch, ErrorCollector errorCollector, FunctionLookupContext functionLookupContext, boolean allowComplexWriterExpr, boolean unionTypeEnabled) Materializes logical expression taking into account passed parameters. Is used to materialize logical expression that contains reference to one batch.- Parameters:
expr
- logical expression to be materializedbatch
- batch instanceerrorCollector
- error collectorfunctionLookupContext
- context to find drill function holderallowComplexWriterExpr
- true if complex expressions are allowedunionTypeEnabled
- true if union type is enabled- Returns:
- materialized logical expression
-
materialize
public static LogicalExpression materialize(LogicalExpression expr, Map<VectorAccessible, BatchReference> batches, ErrorCollector errorCollector, FunctionLookupContext functionLookupContext, boolean allowComplexWriterExpr, boolean unionTypeEnabled) Materializes logical expression taking into account passed parameters. Is used to materialize logical expression that can contain several batches with or without custom batch reference.- Parameters:
expr
- logical expression to be materializedbatches
- one or more batch instances used in expressionerrorCollector
- error collectorfunctionLookupContext
- context to find drill function holderallowComplexWriterExpr
- true if complex expressions are allowedunionTypeEnabled
- true if union type is enabled- Returns:
- materialized logical expression
-
convertToNullableType
public static LogicalExpression convertToNullableType(LogicalExpression fromExpr, TypeProtos.MinorType toType, FunctionLookupContext functionLookupContext, ErrorCollector errorCollector) -
addCastExpression
public static LogicalExpression addCastExpression(LogicalExpression fromExpr, TypeProtos.MajorType toType, FunctionLookupContext functionLookupContext, ErrorCollector errorCollector) -
addCastExpression
public static LogicalExpression addCastExpression(LogicalExpression fromExpr, TypeProtos.MajorType toType, FunctionLookupContext functionLookupContext, ErrorCollector errorCollector, boolean exactResolver)
-