public class CountToDirectScanUtils extends Object
| Constructor and Description |
|---|
CountToDirectScanUtils() |
| Modifier and Type | Method and Description |
|---|---|
static LinkedHashMap<String,Class<?>> |
buildSchema(List<String> fieldNames)
Builds schema based on given field names.
|
static org.apache.calcite.rel.type.RelDataType |
constructDataType(org.apache.calcite.rel.core.Aggregate aggregateRel,
Collection<String> fieldNames)
For each aggregate call creates field based on its name with bigint type.
|
static boolean |
containsStarOrNotNullInput(org.apache.calcite.rel.core.AggregateCall aggregateCall,
org.apache.calcite.rel.core.Aggregate aggregate)
Checks if aggregate call contains star or non-null expression:
|
static List<org.apache.calcite.rex.RexNode> |
prepareFieldExpressions(org.apache.calcite.rel.type.RelDataType rowType)
For each field creates row expression.
|
public static boolean containsStarOrNotNullInput(org.apache.calcite.rel.core.AggregateCall aggregateCall,
org.apache.calcite.rel.core.Aggregate aggregate)
count(*) == > empty arg ==> rowCount count(Not-null-input) ==> rowCount
aggregateCall - aggregate callaggregate - aggregate relation expressionpublic static org.apache.calcite.rel.type.RelDataType constructDataType(org.apache.calcite.rel.core.Aggregate aggregateRel,
Collection<String> fieldNames)
aggregateRel - aggregate relation expressionfieldNames - field namespublic static LinkedHashMap<String,Class<?>> buildSchema(List<String> fieldNames)
fieldNames - field namespublic static List<org.apache.calcite.rex.RexNode> prepareFieldExpressions(org.apache.calcite.rel.type.RelDataType rowType)
rowType - row typeCopyright © 2022 The Apache Software Foundation. All rights reserved.