github-actions[bot] commented on code in PR #69304:
URL: https://github.com/apache/doris/pull/69304#discussion_r4631703670


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/types/AggStateType.java:
##########
@@ -64,6 +65,7 @@ public class AggStateType extends DataType {
     private final List<DataType> subTypes;
     private final List<Boolean> subTypeNullables;
     private final boolean returnNullable;
+    private final int beExecVersion;

Review Comment:
   [P1] Preserve AGG_STATE codec version during sink coercion
   
   The new `beExecVersion` is propagated into the catalog/Nereids type and 
target descriptors, but `AggStateType.equals()`/`hashCode()` still ignore it 
(and the catalog `AggStateType.equals()` does too). `BindSink` then calls 
`castIfNotSameType`, sees a newly planned v20 
`bitmap_intersect_state`/`sum_state` as equal to a stored v19 target, and 
leaves the source expression unchanged. The sink advertises the target's v19 
codec while the expression can produce v20 native/marker state, so old 
AGG_STATE storage can receive an incompatible ColumnNullable/String payload. 
Make codec version part of type identity or add an explicit target-version 
conversion, and cover inserting a v20 state into a v19 AGG_STATE column.



-- 
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]

Reply via email to