github-actions[bot] commented on code in PR #62491:
URL: https://github.com/apache/doris/pull/62491#discussion_r3083515938
##########
fe/fe-type/src/main/java/org/apache/doris/catalog/ArrayType.java:
##########
@@ -48,20 +55,31 @@ public ArrayType() {
}
public ArrayType(Type itemType) {
- this(itemType, true);
+ this.itemType = itemType;
+ this.containsNull = true;
}
+ /**
+ * @deprecated Array elements are always nullable. Use {@link
#ArrayType(Type)} instead.
+ * This constructor is retained only for call-site
compatibility during transition.
+ */
+ @Deprecated
public ArrayType(Type itemType, boolean containsNull) {
this.itemType = itemType;
- this.containsNull = containsNull;
+ // Ignore the parameter — always true
+ this.containsNull = true;
}
public Type getItemType() {
return itemType;
}
+ /**
+ * Always returns {@code true}. Array elements are always nullable in
Doris.
+ */
public boolean getContainsNull() {
- return containsNull;
Review Comment:
This breaks replay/round-trip compatibility for existing FE metadata that
was serialized with `containsNull=false`. The field is still retained for
deserialization, but after this change every runtime consumer sees `true`, so
replayed types silently change shape and FE can no longer faithfully re-emit
the original schema through `matchesType()`, `toSql()`, or thrift. If the goal
is only to normalize BE internals, the FE catalog type still needs to preserve
the stored bit or introduce an explicit compatibility migration.
##########
fe/fe-type/src/main/java/org/apache/doris/catalog/MapType.java:
##########
@@ -177,7 +189,8 @@ public void toThrift(TTypeDesc container) {
Preconditions.checkNotNull(keyType);
Preconditions.checkNotNull(valueType);
Review Comment:
This forces both map nested-nullability bits to `true` on every FE->BE
thrift serialization. That is a compatibility regression for existing FE
metadata / external schemas that still carry `isKeyContainsNull=false` or
`isValueContainsNull=false`, and it also removes information still consumed by
downstream FE integrations such as `DorisTypeToIcebergType` and
`DorisToPaimonTypeVisitor`. Please keep the stored bits intact unless a
versioned migration updates every persisted schema and its readers 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]