egalpin commented on code in PR #10880:
URL: https://github.com/apache/pinot/pull/10880#discussion_r1224708964
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/ForwardIndexHandler.java:
##########
@@ -359,7 +359,8 @@ private boolean shouldDisableDictionary(String column,
ColumnMetadata existingCo
}
// Sorted columns should always have a dictionary.
- if (existingColumnMetadata.isSorted()) {
+ if (existingColumnMetadata.isSorted()
+ && !(existingColumnMetadata.getCardinality() == 1 &&
existingColumnMetadata.isAutoGenerated())) {
Review Comment:
columns which are auto-generated as part of segment reload after adding a
new column always have `cardinality: 1` because the default null value for the
column is the sole value in the segment.
When columns have cardinality of 1, they are inferred to be sorted. It's
possible a better fix exists where the noDictColumns can be referenced at the
time that "isSorted" is determined.
--
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]