Skip to content

Simplify aggregate table for ordered cases #23318

Description

@2010YOUY01

Is your feature request related to a problem or challenge?

Part of #22710
Follow up to #23309

Describe the solution you'd like

For ordered aggregation, we can likely simplify the implementation in a similar way to #23309.

The ordered aggregation case can be split into two variants:

  • Fully ordered input: the input is ordered by (a, b), and the query groups by (a, b)
  • Partially ordered input: the input is ordered by a, and the query groups by (a, b)

For the partially ordered variant, we should still use regular hash aggregation, with the early-emit optimization. For the fully ordered variant, there may be a deeper optimization that avoids the hash table entirely.

This refactor is probably easier after we first add the fast path for the fully ordered case. 🤔

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Fields

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions