#14066·skywalking

[Chore] Remove the legacy query engines from Measure, Stream, and Trace

Author: hanahmilyCreated Sep 10, 2026Updated Sep 22, 2026
Labelsdatabase

Summary

Delete the separate legacy query engines and make vectorized execution the only supported engine. This is the legacy-engine removal portion of parent #13998, not completion of end-to-end batch-native query processing.

Size audit and status

Classification: tracking child for an existing cleanup PR, not an automated implementation task. Implementation: https://github.com/apache/skywalking-banyandb/pull/1326. Boundary: legacy planners, engine dispatch/fallback, and obsolete storage-result APIs across Measure, Stream, and Trace. This tracks the existing cross-engine cleanup; it is not a new request to implement the remaining batch-native work in that PR.

Scope

  • Remove row-based planners, dispatch branches, fallback execution, and obsolete storage-result code.
  • Remove tests and benchmarks whose only subject was the deleted engine.
  • Document removed fallback behavior and temporary compatibility flags.
  • Remove the row-call-site lint guard from PR apache/skywalking-banyandb#1326; human review is sufficient.

Completion criteria

  • PR apache/skywalking-banyandb#1326 merges after resolving its conflicts with main and preserving apache/skywalking-banyandb#1331's filter-first, bounded index-order merge.
  • Measure, Stream, and Trace use the vectorized engine without fallback to the deleted engine.
  • Explicitly disabling vectorized execution fails at startup with a clear error; omission and =true remain accepted during the documented transition.
  • Relevant unit and standalone/distributed integration suites pass.
  • The PR links the remaining workstreams and closes only this child, leaving #13998 open.

Verification

Startup tests cover omission, =true, and =false for the compatibility flags. Query fixtures preserve selected values, ordering, and pagination; documented behavior changes remain explicit.

bash
go test ./pkg/query/... ./banyand/query ./banyand/measure ./banyand/stream ./banyand/trace
go test ./test/integration/standalone/query/... ./test/integration/distributed/query/...

Out of scope

Row-based processing still used internally by the vectorized engine; implementing the four follow-up workstreams; removing transition flags ahead of the documented release. The umbrella retains the final flag/adapter cleanup audit.

Parent: #13998.

Compatibility and review policy

  • Preserve existing on-disk and wire formats and mixed-version compatibility. Any necessary protocol change requires a separately reviewed compatibility contract.
  • Use explicit, hand-calculated expected results; do not depend on the removed row engine as the test oracle.
  • Human review enforces the no-new-row-path policy. A row-call-site lint guard is not required.