clintropolis commented on a change in pull request #10219:
URL: https://github.com/apache/druid/pull/10219#discussion_r469538020
##########
File path:
processing/src/main/java/org/apache/druid/segment/column/ColumnCapabilitiesImpl.java
##########
@@ -72,22 +74,35 @@ public static ColumnCapabilitiesImpl snapshot(@Nullable
final ColumnCapabilities
copy.hasMultipleValues =
copy.hasMultipleValues.coerceUnknownToBoolean(unknownIsTrue);
copy.dictionaryValuesSorted =
copy.dictionaryValuesSorted.coerceUnknownToBoolean(unknownIsTrue);
copy.dictionaryValuesUnique =
copy.dictionaryValuesUnique.coerceUnknownToBoolean(unknownIsTrue);
+ copy.nullable = copy.nullable.coerceUnknownToBoolean(unknownIsTrue);
Review comment:
I agree, and have reworked this in #10248, so have added this to the
`CoerceLogic` interface and implementations.
##########
File path:
processing/src/main/java/org/apache/druid/segment/incremental/IncrementalIndex.java
##########
@@ -685,6 +685,9 @@ IncrementalIndexRowResult toIncrementalIndexRow(InputRow
row)
}
dimsKeySize += indexer.estimateEncodedKeyComponentSize(dimsKey);
// Set column capabilities as data is coming in
+ if (dimsKey == null) {
+ capabilities.setIsNullable(NullHandling.sqlCompatible());
Review comment:
This is now handled by the dimension indexers, which now can all
determine if they have null values or not, so I don't think
`NullHandling.isNullable(ValueType)` is necessary anymore.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]