Package org.apache.druid.segment
Class AggregateProjectionMetadata.Schema
java.lang.Object
org.apache.druid.segment.AggregateProjectionMetadata.Schema
- Enclosing class:
AggregateProjectionMetadata
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Comparator<AggregateProjectionMetadata.Schema> It is not likely the best way to find the best matching projections, but it is the one we have for now. -
Constructor Summary
ConstructorsConstructorDescriptionSchema(String name, String timeColumnName, DimFilter filter, VirtualColumns virtualColumns, List<String> groupingColumns, AggregatorFactory[] aggregators, List<OrderBy> ordering) -
Method Summary
Modifier and TypeMethodDescriptionbooleangetName()intinthashCode()booleanisInvalidGrouping(String columnName) Check if a column is either part ofgroupingColumns, or at least is not present invirtualColumns.toString()
-
Field Details
-
COMPARATOR
It is not likely the best way to find the best matching projections, but it is the one we have for now. This comparator is used to sort all the projections in a segment "best" first, where best is defined as fewest grouping columns, most virtual columns and aggregators, as an approximation of likely to have the fewest number of rows to scan.
-
-
Constructor Details
-
Schema
public Schema(String name, @Nullable String timeColumnName, @Nullable DimFilter filter, @Nullable VirtualColumns virtualColumns, @Nullable List<String> groupingColumns, @Nullable AggregatorFactory[] aggregators, List<OrderBy> ordering)
-
-
Method Details
-
getName
-
getTimeColumnName
-
getFilter
-
getVirtualColumns
-
getGroupingColumns
-
getAggregators
-
getOrdering
-
getOrderingWithTimeColumnSubstitution
-
getTimeColumnPosition
public int getTimeColumnPosition() -
getEffectiveGranularity
-
isInvalidGrouping
Check if a column is either part ofgroupingColumns, or at least is not present invirtualColumns. Naively, we would just check that grouping column contains the column in question, however, we can also use a projection when a column is truly missing.returns a match builder if the column is present as either a physical column, or a virtual column, but a virtual column could also be present for an aggregator input, so we must further check that a column not in the grouping list is also not a virtual column, the implication being that it is a missing column.invalid reference
Projections#matchAggregateProjection(Schema, CursorBuildSpec, Projections.PhysicalColumnChecker) -
equals
-
hashCode
public int hashCode() -
toString
-