gianm commented on a change in pull request #9278: Speed up joins on indexed 
tables with string keys
URL: https://github.com/apache/druid/pull/9278#discussion_r374409826
 
 

 ##########
 File path: 
processing/src/main/java/org/apache/druid/segment/join/table/IndexedTableJoinMatcher.java
 ##########
 @@ -263,8 +299,17 @@ public ValueType defaultType()
         final IndexedInts row = selector.getRow();
 
         if (row.size() == 1) {
-          final String key = selector.lookupName(row.get(0));
-          return index.find(key).iterator();
+          int dimensionId = row.get(0);
+          final IntList rowNumbers;
+          if (selector.getValueCardinality() == 
DimensionDictionarySelector.CARDINALITY_UNKNOWN) {
 
 Review comment:
   This won't change from row to row, so it's likely going to be better to 
check it outside hot code (i.e. return a different `Supplier<IntIterator>` 
based on the result of calling `selector.getValueCardinality()`).

----------------------------------------------------------------
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]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to