You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/04/12 20:51:01 UTC
[GitHub] [pinot] richardstartin commented on a diff in pull request #8485: Manual tracing
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-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