Uh oh!
There was an error while loading. Please reload this page.
[refine](function) use typed ANN query vector - #63834
Conversation
hello-stephen
commented
May 28, 2026
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Mryange
commented
May 28, 2026
/review |
There was a problem hiding this comment.
Review result: no blocking findings in the actual PR diff. The change is limited to keeping ANN query vectors as ColumnFloat32::Ptr after extraction, removing downstream casts, and adding a negative unit test for non-Float32 vector data.
Critical checkpoint conclusions:
- Goal/test: The code accomplishes the stated goal of validating/exposing the ANN query vector as Float32 at extraction time. Existing ANN tests are updated and a NonFloatArrayFails unit test covers the new validation path.
- Scope/minimality: The GitHub PR diff is small and focused on ANN runtime/query-vector typing.
- Concurrency/lifecycle: No new concurrency path is introduced. The shared column pointer lifetime remains owned by Doris column COW pointers; range/topn runtime copies continue to share the immutable constant column data.
- Configuration/compatibility: No new configuration, persisted format, thrift protocol, or storage compatibility change is introduced.
- Parallel paths: Both TopN and range-search ANN paths are updated to use ColumnFloat32::Ptr.
- Error handling: Non-Float32 query vector extraction now returns InvalidArgument instead of relying on a later cast; existing Status propagation is preserved.
- Memory/performance: No significant new allocation or hot-path overhead; the change removes repeated casts.
- Observability: No additional observability appears necessary for this refactor.
- User focus: No additional user-provided focus points were present.
I did not run tests in this review environment.
Mryange
commented
May 28, 2026
run buildall |
hello-stephen
commented
May 28, 2026
TPC-H: Total hot run time: 31411 ms |
hello-stephen
commented
May 28, 2026
TPC-DS: Total hot run time: 172299 ms |
Mryange
commented
May 29, 2026
run beut |
hello-stephen
commented
May 29, 2026
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
hello-stephen
commented
May 29, 2026
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
Uh oh!
There was an error while loading. Please reload this page.
ANN query vector extraction returned a generic `IColumn::Ptr`, so the TopN and range search paths had to downcast the column again before reading float data. This made the code more indirect and delayed type validation. This PR changes the helper and runtime state to keep the query vector as `ColumnFloat32::Ptr`, validates the concrete type at extraction time, and removes redundant casts from the ANN execution path.
This reverts commit a6f53a1.
What problem does this PR solve?
Problem Summary:
ANN query vector extraction returned a generic
IColumn::Ptr, so the TopN and range search paths had to downcast the column again before reading float data. This made the code more indirect and delayed type validation. This PR changes the helper and runtime state to keep the query vector asColumnFloat32::Ptr, validates the concrete type at extraction time, and removes redundant casts from the ANN execution path.Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)