github-actions[bot] commented on code in PR #64125:
URL: https://github.com/apache/doris/pull/64125#discussion_r3392828329
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/util/TypeCoercionUtils.java:
##########
@@ -2148,6 +2149,11 @@ public static Optional<Pair<BigDecimal, BigDecimal>>
getDataTypeMinMaxValue(Data
return Optional.empty();
}
+ private static boolean supportComparisonPredicateType(DataType dataType,
boolean isEqualPredicate) {
+ return isEqualPredicate && (dataType.isJsonType() ||
dataType.isMapType() || dataType.isStructType())
Review Comment:
This shortcut only validates the top-level complex type. Because casts can
build nested unsupported key types (for example `CAST(MAP(1, 'a') AS MAP<INT,
VARBINARY>)` or a `STRUCT` field cast to `VARIANT`), equality now passes here
as MAP/STRUCT and `CheckAfterRewrite.checkEqualCompareType` also only sees the
top-level MAP/STRUCT. That leaves nested VARBINARY/VARIANT keys accepted for
group-by/join/set-operation hashing, even though the PR says those equality
keys remain unsupported. This is separate from the existing unification thread:
the shared predicate needs to recurse through ARRAY/MAP/STRUCT element types
and reject nested object/variant/varbinary before allowing JSON/MAP/STRUCT
equality.
--
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]