Skip to content

Typed workload binding returns no physical expression for frequency and heap top-k sketches #340

Open

Description

@zzylol

Context

Found by the strict whole-path matrix in ProjectASAP/ASAPQuery-backend#478. Three scenarios fail before backend configuration or ingest because the typed workload planner returns no deployment expression:

  1. CountSketch frequency for count_over_time(top_endpoint_qps[10s])
  2. CountSketchWithHeap for topk(3, top_endpoint_qps)
  3. CountMinSketchWithHeap for topk(3, top_endpoint_qps)

All three stop at the backend test helper's call to control_plane::physical::workload_planner::bind_workload_typed(workload) with:

bind_workload_typed produced a PhysicalExpr

The backend currently pins ASAPPlanner types at revision 5d0b6f6edcac65edc89a72051f37977ab0c83031.

Reproduction

From the ASAPQuery-backend PR branch:

./scripts/e2e.sh whole-matrix

Relevant tests:

  • controller_plan_to_query_full_roundtrip_count_sketch
  • controller_plan_to_query_full_roundtrip_count_sketch_with_heap_topk
  • controller_plan_to_query_full_roundtrip_cms_with_heap_topk

Expected

For each supported workload/query shape, typed binding should produce a physical expression whose three-stage split includes a Backend stage with the selected sketch family and readout:

  • frequency/count-over-time -> CountSketch or Count-Min capability
  • top-k -> heap-bearing CountSketch/CMS plus a top-k readout

If a shape is intentionally unsupported, return a typed diagnostic identifying the unsupported capability/shape rather than an unclassified None.

Done when

The three strict whole-path tests progress past typed binding and validate the emitted backend/collector configuration. Backend serving failures, if any, should then be reported separately at ingest/query time.

Activity

  1. added
    binding
    bug
    optimizer
    workload
    on Sep 4, 2026
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

    bindingbugoptimizerworkload

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions