richardstartin commented on code in PR #8485:
URL: https://github.com/apache/pinot/pull/8485#discussion_r848858551


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/realtime/impl/json/MutableJsonIndexImpl.java:
##########
@@ -291,6 +297,19 @@ private RoaringBitmap getMatchingFlattenedDocIds(Predicate 
predicate) {
     }
   }
 
+  private void record(ImmutableRoaringBitmap bitmap, FilterContext filter) {
+    InvocationRecording recording = Tracing.activeRecording();
+    if (recording.isEnabled()) {
+      recording.setColumnCardinality(_postingListMap.size());
+      recording.setFilter(FilterType.INDEX, 
describeJsonPredicate(filter.getPredicate()));
+      recording.setNumDocsMatchingAfterFilter(bitmap.getCardinality());
+    }
+  }
+
+  private static String describeJsonPredicate(Predicate predicate) {
+    return predicate == null ? "?" : predicate.getLhs().getIdentifier() + ":" 
+ predicate.getType() + "?";

Review Comment:
   It returns the column, the predicate type (usually EQ) and an argument. It 
must not capture PII from the value, and high cardinality data should be 
avoided. It is a low cardinality indicator of the predicate structure.



-- 
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-unsubscr...@pinot.apache.org

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


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

Reply via email to