clintropolis commented on code in PR #17760:
URL: https://github.com/apache/druid/pull/17760#discussion_r1972467503
##########
processing/src/main/java/org/apache/druid/segment/column/CapabilitiesBasedFormat.java:
##########
@@ -111,18 +110,18 @@ public ColumnFormat merge(@Nullable ColumnFormat
otherFormat)
} else if (!Objects.equals(merged.getComplexTypeName(),
otherSnapshot.getComplexTypeName())) {
throw new ISE(
"Cannot merge columns of type[%s] and [%s]",
- merged.getComplexTypeName(),
- otherSnapshot.getComplexTypeName()
+ mergedType,
+ otherType
);
}
merged.setDictionaryEncoded(merged.isDictionaryEncoded().or(otherSnapshot.isDictionaryEncoded()).isTrue());
merged.setHasMultipleValues(merged.hasMultipleValues().or(otherSnapshot.hasMultipleValues()).isTrue());
merged.setDictionaryValuesSorted(
-
merged.areDictionaryValuesSorted().and(otherSnapshot.areDictionaryValuesSorted()).isTrue()
+
merged.areDictionaryValuesSorted().or(otherSnapshot.areDictionaryValuesSorted()).isTrue()
Review Comment:
To add, your comment highlights why `ColumnFormat` exists in the first
place, which is because simply merging `ColumnCapabilities` in a
generic/universal manner isn't really powerful enough to model these things in
a satisfying way.
--
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]