clintropolis commented on code in PR #12714:
URL: https://github.com/apache/druid/pull/12714#discussion_r910593369
##########
processing/src/main/java/org/apache/druid/segment/incremental/IncrementalIndexAdapter.java:
##########
@@ -212,21 +217,22 @@ public IntIterator iterator()
}
}
- @Override
- public String getMetricType(String metric)
- {
- return index.getMetricType(metric);
- }
-
- @Override
- public ColumnCapabilities getCapabilities(String column)
+ private static class DimensionAccessor
{
- return index.getColumnCapabilities(column);
- }
+ private final IncrementalIndex.DimensionDesc dimensionDesc;
+ @Nullable
+ private final MutableBitmap[] invertedIndexes;
+ private final DimensionIndexer indexer;
- @Override
- public Metadata getMetadata()
- {
- return index.getMetadata();
+ public DimensionAccessor(IncrementalIndex.DimensionDesc dimensionDesc)
+ {
+ this.dimensionDesc = dimensionDesc;
+ this.indexer = dimensionDesc.getIndexer();
+ if (dimensionDesc.getCapabilities().hasBitmapIndexes()) {
+ this.invertedIndexes = new MutableBitmap[indexer.getCardinality() + 1];
+ } else {
+ this.invertedIndexes = null;
+ }
+ }
Review Comment:
ah yeah, i moved some stuff around, `getIncrementalIndex` is a newly added
method though
##########
processing/src/main/java/org/apache/druid/segment/incremental/IncrementalIndexAdapter.java:
##########
@@ -212,21 +217,22 @@ public IntIterator iterator()
}
}
- @Override
- public String getMetricType(String metric)
- {
- return index.getMetricType(metric);
- }
-
- @Override
- public ColumnCapabilities getCapabilities(String column)
+ private static class DimensionAccessor
{
- return index.getColumnCapabilities(column);
- }
+ private final IncrementalIndex.DimensionDesc dimensionDesc;
+ @Nullable
+ private final MutableBitmap[] invertedIndexes;
+ private final DimensionIndexer indexer;
- @Override
- public Metadata getMetadata()
- {
- return index.getMetadata();
+ public DimensionAccessor(IncrementalIndex.DimensionDesc dimensionDesc)
+ {
+ this.dimensionDesc = dimensionDesc;
+ this.indexer = dimensionDesc.getIndexer();
+ if (dimensionDesc.getCapabilities().hasBitmapIndexes()) {
+ this.invertedIndexes = new MutableBitmap[indexer.getCardinality() + 1];
+ } else {
+ this.invertedIndexes = null;
+ }
+ }
Review Comment:
ah yeah, i moved some stuff around, `getIncrementalIndex` is a newly added
method though, sorry for the noise
--
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]