Package org.apache.druid.sql.calcite.rel
Class Projection
java.lang.Object
org.apache.druid.sql.calcite.rel.Projection
Used to represent projections (Calcite "Project"). These are embedded in
Sorting and Grouping to
store post-sorting and post-grouping projections, as well as directly in DruidQuery to store potential
post-selection projections. They may be built using either virtual columns (pre-aggregation) or post-aggregators.
It is expected that callers will create and use Projection instances in the same context (pre- or post-aggregation).
If this isn't done properly (i.e. a caller creates a pre-aggregation Projection but then calls
getPostAggregators() then an exception will be thrown.-
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()static ProjectionpostAggregation(org.apache.calcite.rel.core.Project project, PlannerContext plannerContext, RowSignature inputRowSignature, String basePrefix) static ProjectionpreAggregation(org.apache.calcite.rel.core.Project project, PlannerContext plannerContext, RowSignature inputRowSignature, VirtualColumnRegistry virtualColumnRegistry) toString()
-
Method Details
-
postAggregation
public static Projection postAggregation(org.apache.calcite.rel.core.Project project, PlannerContext plannerContext, RowSignature inputRowSignature, String basePrefix) -
preAggregation
public static Projection preAggregation(org.apache.calcite.rel.core.Project project, PlannerContext plannerContext, RowSignature inputRowSignature, VirtualColumnRegistry virtualColumnRegistry) -
getPostAggregators
-
getVirtualColumns
-
getOutputRowSignature
-
equals
-
hashCode
public int hashCode() -
toString
-