csun5285 commented on code in PR #70408:
URL: https://github.com/apache/doris/pull/70408#discussion_r4674927591


##########
fe/fe-catalog/src/main/java/org/apache/doris/catalog/Column.java:
##########
@@ -928,6 +933,12 @@ public String toSql(boolean isUniqueTable, boolean 
isCompatible, boolean useGene
         } else {
             sb.append(typeStr);
         }
+        if (isCompatible && type.isVariantType()) {
+            // The DDL of an internal table shows the serialize type in a 
comment, which the parser skips: a column
+            // the DDL creates is new (V2) whatever it says.
+            sb.append(" /* variant_serialize_type = ")
+                    .append(getVariantSerializeType() == 
TVariantSerializeType.V2 ? "v2" : "v1").append(" */");
+        }

Review Comment:
   variant_serialize_type is intentionally kept as a display-only comment so 
users cannot declare it in DDL. Existing upgraded V1 tables are synced by CCR 
via snapshot/metadata (which preserves V1), while new tables created on 4.2 are 
already V2; 



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