Package org.apache.drill.exec.expr
Class ExpressionTreeMaterializer
java.lang.Object
org.apache.drill.exec.expr.ExpressionTreeMaterializer
-
Method Summary
Modifier and TypeMethodDescriptionstatic LogicalExpressionaddCastExpression(LogicalExpression fromExpr, TypeProtos.MajorType toType, FunctionLookupContext functionLookupContext, ErrorCollector errorCollector) static LogicalExpressionaddCastExpression(LogicalExpression fromExpr, TypeProtos.MajorType toType, FunctionLookupContext functionLookupContext, ErrorCollector errorCollector, boolean exactResolver) static LogicalExpressionconvertToNullableType(LogicalExpression fromExpr, TypeProtos.MinorType toType, FunctionLookupContext functionLookupContext, ErrorCollector errorCollector) static LogicalExpressionmaterialize(LogicalExpression expr, Map<VectorAccessible, BatchReference> batches, ErrorCollector errorCollector, FunctionLookupContext functionLookupContext, boolean allowComplexWriterExpr, boolean unionTypeEnabled) Materializes logical expression taking into account passed parameters.static LogicalExpressionmaterialize(LogicalExpression expr, VectorAccessible batch, ErrorCollector errorCollector, FunctionLookupContext functionLookupContext) static LogicalExpressionmaterialize(LogicalExpression expr, VectorAccessible batch, ErrorCollector errorCollector, FunctionLookupContext functionLookupContext, boolean allowComplexWriterExpr) static LogicalExpressionmaterialize(LogicalExpression expr, VectorAccessible batch, ErrorCollector errorCollector, FunctionLookupContext functionLookupContext, boolean allowComplexWriterExpr, boolean unionTypeEnabled) Materializes logical expression taking into account passed parameters.static LogicalExpressionmaterializeAndCheckErrors(LogicalExpression expr, VectorAccessible batch, FunctionLookupContext functionLookupContext) static LogicalExpressionmaterializeFilterExpr(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)
-