hello-stephen commented on code in PR #70223:
URL: https://github.com/apache/doris/pull/70223#discussion_r4750065276
##########
fe/fe-type/src/main/java/org/apache/doris/catalog/AggStateType.java:
##########
@@ -108,11 +121,9 @@ protected String prettyPrint(int lpad) {
public void toThrift(TTypeDesc container) {
TTypeNode node = new TTypeNode();
container.types.add(node);
- // ATTN: use scalar only for compatibility.
- node.setType(TTypeNodeType.SCALAR);
- TScalarType scalarType = new TScalarType();
- scalarType.setType(getPrimitiveType().toThrift());
- node.setScalarType(scalarType);
+ node.setType(TTypeNodeType.AGG_STATE);
Review Comment:
[P2] Gate recursive state descriptors for older BEs
When an upgraded FE plans an existing state expression such as
`sum_state(CAST(1 AS INT))` for a pre-change BE, this sends
`TTypeNodeType.AGG_STATE=6` unconditionally. That BE's
`DataTypeFactory(TTypeDesc)` recognizes only the legacy `SCALAR/AGG_STATE`
form, and its flat-node reader rejects enum 6 with `invalid PrimitiveType`, so
expression/slot construction fails even with `be_exec_version` kept at the old
value. Existing state-column scans are affected too. Preserve the legacy
encoding for compatible signatures and gate the recursive encoding/result
layouts on recipient support.
--
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]