morrySnow commented on code in PR #67680:
URL: https://github.com/apache/doris/pull/67680#discussion_r3987581762
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/check/CheckCast.java:
##########
@@ -384,6 +357,16 @@ public static boolean check(DataType originalType,
DataType targetType, boolean
*/
public static boolean check(DataType originalType, DataType targetType,
boolean isStrictMode, boolean looseAggState) {
+ // Serialized values do not carry the aggregate function's state
invariants.
+ // Matching containers are checked recursively below; parsing a value
into a container
+ // of states must not bypass the same restriction (for example,
Variant -> Array<AggState>).
+ if (checkTypeContainsType(targetType, AggStateType.class)
+ && !originalType.isAggStateType() && !originalType.isNullType()
+ && !(originalType.isArrayType() && targetType.isArrayType())
+ && !(originalType.isMapType() && targetType.isMapType())
+ && !(originalType.isStructType() &&
targetType.isStructType())) {
+ return false;
+ }
Review Comment:
要把后面关于aggstate的改掉,而不是在最开始加一段补丁
--
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]