gianm commented on code in PR #19410:
URL: https://github.com/apache/druid/pull/19410#discussion_r3262702388
##########
processing/src/main/java/org/apache/druid/segment/StringDimensionIndexer.java:
##########
@@ -77,12 +82,39 @@ public StringDimensionIndexer(
boolean hasSpatialIndexes,
@Nullable Integer maxStringLength
)
+ {
+ this(multiValueHandling, hasBitmapIndexes, hasSpatialIndexes,
maxStringLength, null);
+ }
+
+ public StringDimensionIndexer(
+ @Nullable MultiValueHandling multiValueHandling,
+ boolean hasBitmapIndexes,
+ boolean hasSpatialIndexes,
+ @Nullable Integer maxStringLength,
+ @Nullable StringColumnFormatSpec columnFormatSpec
+ )
{
super(new StringDimensionDictionary());
this.multiValueHandling = multiValueHandling == null ?
MultiValueHandling.ofDefault() : multiValueHandling;
this.hasBitmapIndexes = hasBitmapIndexes;
this.hasSpatialIndexes = hasSpatialIndexes;
this.maxStringLength = maxStringLength;
+ this.columnFormatSpec = columnFormatSpec;
+ }
+
+ @Override
+ public ColumnFormat getFormat()
+ {
+ if (columnFormatSpec != null) {
+ return new StringDictionaryEncodedColumnFormat(
+ hasMultipleValues,
+ false,
Review Comment:
We should be able to provide a proper value for `hasNulls` here, using the
same check that `getColumnCapabilities` does: `dimLookup.getIdForNull() !=
DimensionDictionary.ABSENT_VALUE_ID`.
--
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]