[refactor](be) Use ColumnArrayView in array functions#64873
Conversation
### What problem does this PR solve? Issue Number: close #xxx Related PR: #xxx Problem Summary: Refactor array_contains, array_position, countequal, array_remove, and arrays_overlap to read array arguments through ColumnArrayView and ColumnView instead of expanding const columns or manually unpacking nullable array internals. This keeps const and nullable handling in the shared view abstraction and reduces duplicated array access code. Add BE unit coverage for const array and const target argument cases. ### Release note None ### Check List (For Author) - Test: Not run (per request); only ran clang-format-16 and git diff --check. - Behavior changed: No - Does this need documentation: No
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
/review |
There was a problem hiding this comment.
Automated review completed for PR #64873. I found no issues that warrant an inline review comment.
Critical checkpoint conclusions:
- Goal: refactor array functions to use
ColumnArrayView/ColumnViewwhile covering const arguments. The changed BE paths accomplish that forarray_contains,array_position,countequal,array_remove, andarrays_overlap. - Scope/focus: the PR scope was verified through GitHub PR files/commit/compare APIs as the seven BE array source/test files listed in
.code-review.GF2Snu/pr_changed_files.txt. Local raw diff showed grafted/shallow checkout noise and was not used as PR scope. - Correctness: const arrays, const scalar arguments, outer nullable arrays, and nullable array elements keep the same semantics as the previous implementations. Null scalar/null element matching and nullable result wrapping were checked against the old code and
DataTypeArraystorage invariants. - Parallel paths: FE scalar signatures coerce scalar/array element types before BE execution, and the array-family functions were reviewed together for equivalent dispatch and null handling.
- Concurrency/lifecycle/config/persistence: no new shared mutable state, lifecycle management, configuration item, serialization format, transaction path, or persistence behavior is introduced.
- Tests: the new BE unit test file is picked up by the recursive BE test CMake glob, and added tests cover const array/scalar cases with null elements. I could not run BE unit tests in this runner because
thirdparty/installedand a builtdoris_be_testbinary are absent. - Hygiene:
git diff --checkon the PR files passed, andPATH=/usr/lib/llvm-16/bin:$PATH build-support/check-format.shpassed.
User focus: no additional user-provided review focus was present.
Subagent conclusions: optimizer-rewrite reported no candidate findings; tests-session-config reported no candidate findings. The final counted convergence round was round 2, after the main ledger included the final scope dismissal and an empty proposed comment set; both live subagents replied NO_NEW_VALUABLE_FINDINGS for that same ledger/comment set.
|
run buildall |
TPC-H: Total hot run time: 29231 ms |
TPC-DS: Total hot run time: 171703 ms |
ClickBench: Total hot run time: 25.35 s |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run buildall |
TPC-H: Total hot run time: 29216 ms |
TPC-DS: Total hot run time: 171764 ms |
ClickBench: Total hot run time: 25.26 s |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
What problem does this PR solve?
Problem Summary: Refactor array_contains, array_position, countequal, array_remove, and arrays_overlap to read array arguments through ColumnArrayView and ColumnView instead of expanding const columns or manually unpacking nullable array internals. This keeps const and nullable handling in the shared view abstraction and reduces duplicated array access code. Add BE unit coverage for const array and const target argument cases.
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)