eldenmoon opened a new pull request, #63479:
URL: https://github.com/apache/doris/pull/63479
### What problem does this PR solve?
Issue Number: close #25672
Related PR: None
Problem Summary: `COUNT(DISTINCT variant_subcolumn)` could reach BE hash key
selection and fail with a vague `INTERNAL_ERROR` when the argument was
`VARIANT`. This PR rejects `VARIANT` arguments during FE aggregate analysis and
keeps a clearer BE fallback for uncaught hash-key paths.
### Release note
`COUNT(DISTINCT ...)` on `VARIANT` arguments now reports a clear
unsupported-type error instead of a BE internal error. Cast `VARIANT`
expressions to `STRING` or another supported scalar type before using `COUNT
DISTINCT`.
### Check List (For Author)
- Test: Unit Test
- `./run-fe-ut.sh --run
org.apache.doris.nereids.trees.expressions.functions.agg.CountTest`
- Regression test added but not run locally because the new worktree
does not have a built output cluster.
- Behavior changed: Yes. `COUNT DISTINCT` on `VARIANT` now fails during
analysis with a clearer error instead of a BE `INTERNAL_ERROR`.
- 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]