gortiz commented on code in PR #10184:
URL: https://github.com/apache/pinot/pull/10184#discussion_r1153286344
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/ForwardIndexHandler.java:
##########
@@ -198,20 +211,21 @@ Map<String, List<Operation>>
computeOperations(SegmentDirectory.Reader segmentRe
// Get list of columns with forward index and those without forward index
Set<String> existingForwardIndexColumns =
-
segmentReader.toSegmentDirectory().getColumnsWithIndex(ColumnIndexType.FORWARD_INDEX);
+
segmentReader.toSegmentDirectory().getColumnsWithIndex(StandardIndexes.forward());
Set<String> existingForwardIndexDisabledColumns = new HashSet<>();
for (String column : existingAllColumns) {
if (!existingForwardIndexColumns.contains(column)) {
existingForwardIndexDisabledColumns.add(column);
}
}
- // From new column config.
- Set<String> newNoDictColumns =
_indexLoadingConfig.getNoDictionaryColumns();
- Set<String> newForwardIndexDisabledColumns =
_indexLoadingConfig.getForwardIndexDisabledColumns();
-
for (String column : existingAllColumns) {
- if (existingForwardIndexColumns.contains(column) &&
newForwardIndexDisabledColumns.contains(column)) {
+ FieldIndexConfigs newConf = _fieldIndexConfigs.get(column);
+ boolean newIsFwd =
newConf.getConfig(StandardIndexes.forward()).isEnabled();
+ boolean newIsDict =
newConf.getConfig(StandardIndexes.dictionary()).isEnabled();
+ boolean newIsRange =
newConf.getConfig(StandardIndexes.range()).isEnabled();
Review Comment:
is it? Given that we have an older state and a new/desired state,
`fwdIsEnabled` means that the column has a forward index right now or that it
is enabled in the new configuration?
I think with the new nomenclature nobody is going to have that doubt.
--
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]