jasperjiaguo commented on code in PR #9420:
URL: https://github.com/apache/pinot/pull/9420#discussion_r980749429
##########
pinot-core/src/main/java/org/apache/pinot/core/operator/dociditerators/ScanBasedDocIdIterator.java:
##########
@@ -44,4 +44,13 @@ public interface ScanBasedDocIdIterator extends
BlockDocIdIterator {
* iteration. This method should be called after the iteration is done.
*/
long getNumEntriesScanned();
+
+ /**
+ * Returns the effective cardinality of the underlying data source
+ */
+
+ default float getEffectiveCardinality(boolean isAndDocIdSet) {
Review Comment:
Because for the iterators with N/A matching items (expression, range, regex)
we will need to put them in the back of the sorted order so that they evaluate
in the end. And due to that AND wants to sort cardinality high->low while OR
wants low->high, we need to handle these two cases differently, i.e. return
Float.NEGATIVE_INFINITY for AND, and Float.POSITIVE_INFINITY for OR. Updated
name.
--
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]