github-actions[bot] commented on code in PR #69012:
URL: https://github.com/apache/doris/pull/69012#discussion_r4309787274
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/types/AggStateType.java:
##########
@@ -93,6 +94,14 @@ public AggStateType(String functionName, List<DataType>
subTypes,
this.looseTypeCoercionAllowed = looseTypeCoercionAllowed;
}
+ /** Resolve SQL type declarations without changing the decoder for
persisted states. */
+ public static AggStateType fromSql(String functionName, List<DataType>
subTypes,
+ List<Boolean> subTypeNullables, boolean returnNullable) {
+ String resolvedName = "bitmap_intersect".equalsIgnoreCase(functionName)
Review Comment:
[P1] Reject v1 snapshots when restoring into a v2 state schema
A pre-upgrade backup of an `AGG_STATE<bitmap_intersect(...)>` table contains
v1 bytes, but recreating the target with the same DDL now produces v2. With
`atomic_restore=false`, restoring over that existing table still passes
`RestoreJob`'s schema check: `OlapTable.getSignature()` uses
`Column.getSignatureString()`, which omits the AGG_STATE function identity. The
restore retains the target's FE schema while loading the old snapshot.
`OlapScanner` uses the v2 FE column descriptors, and the AGG_STATE reader
copies the v1 strings without matching decoder identities, so subsequent merges
parse them with the wrong framing. This is distinct from the existing MODIFY
COLUMN issue: RESTORE uses a separate schema-signature check. Include the
decoder identity in restore compatibility checks, or preserve/migrate the
snapshot schema and bytes together.
--
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]