You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "wirybeaver (via GitHub)" <gi...@apache.org> on 2023/12/03 04:18:08 UTC

Re: [PR] [experiment / poc] Dictionary Based Group-By [pinot]

wirybeaver commented on code in PR #11758:
URL: https://github.com/apache/pinot/pull/11758#discussion_r1412993320


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/readers/json/ImmutableJsonIndexReader.java:
##########
@@ -101,6 +103,23 @@ public MutableRoaringBitmap getMatchingDocIds(String filterString) {
     }
   }
 
+  public ImmutableRoaringBitmap getDocIds(int dictId) {
+    ImmutableRoaringBitmap flattenedDocIds = _invertedIndex.getDocIds(dictId);
+    MutableRoaringBitmap result = new MutableRoaringBitmap();
+    flattenedDocIds.stream().forEach(f -> result.add(getDocId(f)));
+    return result;
+  }
+
+  public Pair<Object[], Integer> getValues(String key) {
+    int startIndex = _dictionary.indexOf(key + JsonIndexCreator.KEY_VALUE_SEPARATOR);

Review Comment:
   I realized that the current json indexing store the whole key/value pair as a sorted string table without compression even though the key is the common prefix when I see this two lines of code :)



-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org