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


##########
fe/fe-core/src/main/java/org/apache/doris/backup/RestoreJob.java:
##########
@@ -23,6 +23,7 @@
 import org.apache.doris.backup.BackupJobInfo.BackupTabletInfo;
 import org.apache.doris.backup.RestoreFileMapping.IdChain;
 import org.apache.doris.backup.Status.ErrCode;
+import org.apache.doris.catalog.Column;
 import org.apache.doris.catalog.DataProperty;
 import org.apache.doris.catalog.Database;

Review Comment:
   [P1] Do not infer discarded local AGG_STATE metadata on FORCE restore
   
   When `isForceReplace` is true, this condition still evaluates 
`aggStateSignatures(localOlapTbl)` before entering the force-replace branch. 
That helper calls `DataType.fromCatalogType` for every legacy state, so a local 
table containing an old or no-longer-resolvable aggregate signature throws 
`AnalysisException`; the catch below returns `COMMON_ERROR` and the restore 
never replaces the local table. Treat local inference failure as a schema 
mismatch under FORCE (or skip the local signature comparison) so replacement 
can proceed.



##########
fe/fe-core/src/main/java/org/apache/doris/catalog/ColumnToProtobuf.java:
##########
@@ -21,6 +21,10 @@
 import org.apache.doris.common.DdlException;
 import org.apache.doris.proto.OlapFile;
 import org.apache.doris.proto.OlapFile.PatternTypePB;
+import org.apache.doris.proto.Types;
+import org.apache.doris.thrift.TScalarType;
+import org.apache.doris.thrift.TStructField;
+import org.apache.doris.thrift.TTypeNode;
 

Review Comment:
   [P2] Preserve Variant attributes in AGG_STATE result metadata
   
   `aggStateResultToPb` copies the scalar type, length, precision, and scale, 
but drops the Variant attributes that `VariantType.toThrift` writes 
(`variant_max_subcolumns_count`, `variant_enable_doc_mode`, and 
`variant_is_v2`). An AGG_STATE whose result contains Variant (for example 
`array_agg(variant)`) is reconstructed by BE with default Variant settings 
after a ColumnPB/tablet round-trip, changing the saved result type and Variant 
behavior. Copy these fields into the PTypeNode and add a round-trip test.



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