This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 4fc9a0779e2 [Debug] Throw exception if array literal of ann dist
function is nullable (#60489)
4fc9a0779e2 is described below
commit 4fc9a0779e2efbf8528f8803b362f4b9d1c41275
Author: zhiqiang <[email protected]>
AuthorDate: Wed Feb 4 18:40:06 2026 +0800
[Debug] Throw exception if array literal of ann dist function is nullable
(#60489)
### What problem does this PR solve?
Array literal of ann search has nullable type in some cases, this is
incorrect. Throw exception if it happens so that we can check the
session vars.
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [ ] Regression test
- [ ] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason <!-- Add your reason? -->
- Behavior changed:
- [ ] No.
- [ ] Yes. <!-- Explain the behavior change -->
- Does this need documentation?
- [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->
---
be/src/vec/exprs/vectorized_fn_call.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/be/src/vec/exprs/vectorized_fn_call.cpp
b/be/src/vec/exprs/vectorized_fn_call.cpp
index be182359674..059fc2fcfc4 100644
--- a/be/src/vec/exprs/vectorized_fn_call.cpp
+++ b/be/src/vec/exprs/vectorized_fn_call.cpp
@@ -418,7 +418,12 @@ void VectorizedFnCall::prepare_ann_range_search(
suitable_for_ann_index = false;
return;
}
-
+#ifndef NDEBUG
+ if (right_literal->is_nullable()) {
+ throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
+ "ANN range search with nullable literal is not
supported");
+ }
+#endif
auto right_col =
right_literal->get_column_ptr()->convert_to_full_column_if_const();
auto right_type = right_literal->get_data_type();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]