[Chore] Remove the legacy query engines from Measure, Stream, and Trace
- Dominant language
- Java
- Stars
- 25k
- Forks
- 6.6k
- Avg merge
- 10h 5m
- Merged PRs (30d)
- 16
Description
## 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.
```sh
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.
Contributor guide
Research direction
Start by reviewing PR apache/skywalking-banyandb#1326 and its conflicts with main, while preserving #1331's filter-first merge. Then run the listed unit and standalone/distributed integration suites under pkg/query, banyand/query, banyand/measure, banyand/stream, banyand/trace, and test/integration. Done means the legacy paths are removed, compatibility-flag behavior is verified, and the relevant suites pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases, distributed-systems, testing
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 20/100