github-actions[bot] commented on code in PR #68439:
URL: https://github.com/apache/doris/pull/68439#discussion_r4083990811
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/DictGetMany.java:
##########
@@ -126,6 +146,9 @@ public Pair<FunctionSignature, Dictionary>
customSignatureDict() {
List<StructField> originQueryFields = ((StructType)
getArgumentType(2)).getFields();
List<StructField> targetQueryFields = new ArrayList<>(); // after add
essential castExpr
List<DataType> targetTypes = dictionary.getKeyColumnTypes(); // query
columns should cast to key columns' types
+ if (originQueryFields.size() != targetTypes.size()) {
Review Comment:
**[P1] Reject key fields when no implicit cast exists**
The new arity check still lets an equal-length but uncastable STRUCT reach
BE. For a BIGINT-keyed HASH_MAP dictionary, a `STRUCT<TIMESTAMP_NS>` key
reaches the loop below; `implicitCast(TIMESTAMP_NS, BIGINT)` intentionally
returns empty, so the source type is retained. BE selects the same 64-bit hash
method for both and probes the BIGINT table with raw epoch-nanosecond bits (for
example, epoch `0` can match BIGINT key `0`), returning a value even though FE
defines no legal implicit conversion. This is not explicit-cast behavior, which
converts through civil datetime. Differently sized targets instead fail later
with `key column not match`. Please throw an `AnalysisException` when a
HASH_MAP field has no implicit cast and add an analyzer-level equal-arity
unsupported-conversion test.
--
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]