Class RewriteSpatialPartitioningAggregation
java.lang.Object
io.trino.sql.planner.iterative.rule.RewriteSpatialPartitioningAggregation
- All Implemented Interfaces:
Rule<AggregationNode>
Re-writes spatial_partitioning(geometry) aggregations into spatial_partitioning(envelope, partition_count)
on top of ST_Envelope(geometry) projection, e.g.
- Aggregation: spatial_partitioning(geometry)
- source
becomes
- Aggregation: spatial_partitioning(envelope, partition_count)
- Project: envelope := ST_Envelope(geometry)
- source
, where partition_count is the value of session property hash_partition_count (or fault_tolerant_execution_partition_count when task level retries are enabled)-
Nested Class Summary
Nested classes/interfaces inherited from interface io.trino.sql.planner.iterative.Rule
Rule.Context, Rule.Result -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(AggregationNode node, Captures captures, Rule.Context context) Returns a pattern to which plan nodes this rule applies.
-
Constructor Details
-
RewriteSpatialPartitioningAggregation
-
-
Method Details
-
getPattern
Description copied from interface:RuleReturns a pattern to which plan nodes this rule applies.- Specified by:
getPatternin interfaceRule<AggregationNode>
-
apply
- Specified by:
applyin interfaceRule<AggregationNode>
-