HappenLee opened a new pull request, #68409:
URL: https://github.com/apache/doris/pull/68409
### What problem does this PR solve?
Related PR: #68254
Backport #68254 (dbea64bcec932fdbd7aa43576953eae1a167b7c0) to `branch-4.1`.
The FE already accepts BOOLEAN inputs for `topn_array` and `topn_weighted`, but
the BE factory lists omit BOOLEAN, so queries such as `SELECT
topn_weighted(TRUE, 1, 2)` fail during aggregate creation.
Add `TYPE_BOOLEAN` to both existing creator lists, covering both arities.
Resolve the conflicting lists against branch-4.1 by retaining its existing
supported types; do not import master's `TYPE_TIMESTAMP_NS`. Reuse branch-4.1's
numeric aggregation, nullable handling, serialization and merge behavior.
Preserve the BOOLEAN array result type and existing FE signatures.
Retain the upstream BE unit tests, SQL regression suite and generated
expected output unchanged.
### Release note
`TOPN_WEIGHTED` and `TOPN_ARRAY` now execute on BOOLEAN inputs and preserve
BOOLEAN array results.
### Check List (For Author)
- Test:
- C++ syntax and template-instantiation checks passed for both modified
factories and the new BE unit test, using this worktree's ASAN unit-test
compilation database and PCH.
- Attempted `./run-be-ut.sh --run -j48
--filter='AggregateFunctionTopNBooleanTest.*:AggTest.topn*'`. After building
the missing simdutf dependency with the existing thirdparty script, the build
remained blocked by the environment's older AWS SDK:
`common/cpp/aws_common.cpp` cannot find
`aws/core/auth/GeneralHTTPCredentialsProvider.h`. The tests did not run.
- SQL regression tests were not rerun for this backport.
- `build-support/clang-format.sh` and `build-support/check-format.sh`
passed with clang-format 16.0.6.
- All three test files are byte-identical to merged PR #68254; the
existing generated output was preserved, not handwritten.
- Behavior changed: Yes. BOOLEAN top-N array aggregates execute instead of
failing BE function creation.
- Does this need documentation: No.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]