Skip to content

Pass 2 reuse rules: rollup, top-k reuse, nested sum merge #680

Open

Description

@zzylol

The legacy search could answer a computation from a cheaper related one. The planning stages don't do this yet. The results are correct; only cheaper plans are missing.

  • Rollup: answer a coarse group by from a finer one (rollup).
  • Top-k reuse: answer a small-k top-k from a larger-k one over the same partition (topk_reuse).
  • Merge: collapse sum by (…) (sum_over_time(…)) into one accumulator.

These belong to Pass 2 (ASAP-aware CSE) as sharing rules, each producing a shared candidate that plan selection prices against the separate ones. The legacy implementations are at e80cfef (rollup.rs, topk_reuse.rs, and the nested-sum handling in replacement.rs) for reference.

Found in the #676 capability audit. Related: #580 and Pass 2.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions