Class BuiltinApproxCountDistinctSqlAggregator
java.lang.Object
org.apache.druid.sql.calcite.aggregation.builtin.BuiltinApproxCountDistinctSqlAggregator
- All Implemented Interfaces:
SqlAggregator
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.calcite.sql.SqlAggFunctionReturns the SQL operator corresponding to this aggregation function.toDruidAggregation(PlannerContext plannerContext, VirtualColumnRegistry virtualColumnRegistry, String name, org.apache.calcite.rel.core.AggregateCall aggregateCall, InputAccessor inputAccessor, List<Aggregation> existingAggregations, boolean finalizeAggregations) Returns a Druid Aggregation corresponding to a SQLAggregateCall.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.druid.sql.calcite.aggregation.SqlAggregator
toDruidAggregation
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
BuiltinApproxCountDistinctSqlAggregator
public BuiltinApproxCountDistinctSqlAggregator()
-
-
Method Details
-
calciteFunction
public org.apache.calcite.sql.SqlAggFunction calciteFunction()Description copied from interface:SqlAggregatorReturns the SQL operator corresponding to this aggregation function. Should be a singleton.- Specified by:
calciteFunctionin interfaceSqlAggregator- Returns:
- operator
-
toDruidAggregation
@Nullable public Aggregation toDruidAggregation(PlannerContext plannerContext, VirtualColumnRegistry virtualColumnRegistry, String name, org.apache.calcite.rel.core.AggregateCall aggregateCall, InputAccessor inputAccessor, List<Aggregation> existingAggregations, boolean finalizeAggregations) Description copied from interface:SqlAggregatorReturns a Druid Aggregation corresponding to a SQLAggregateCall. This method should ignore filters; they will be applied to your aggregator in a later step.- Specified by:
toDruidAggregationin interfaceSqlAggregator- Parameters:
plannerContext- SQL planner contextvirtualColumnRegistry- re-usable virtual column referencesname- desired output name of the aggregationaggregateCall- aggregate call objectinputAccessor- gives access to input fields and schemaexistingAggregations- existing aggregations for this query; useful for re-using aggregations. May be safely ignored if you do not want to re-use existing aggregations.finalizeAggregations- true if this query should include explicit finalization for all of its aggregators, where required. This is set for subqueries where Druid's native query layer does not do this automatically.- Returns:
- aggregation, or null if the call cannot be translated
-