xiangfu0 commented on code in PR #20422:
URL: https://github.com/apache/pinot/pull/20422#discussion_r4795806915
##########
pinot-core/src/main/java/org/apache/pinot/core/query/request/context/QueryContext.java:
##########
@@ -278,6 +280,36 @@ public FilterContext getRowFilter() {
return _rowFilter;
}
+ /// Returns the policy for this segment, including a single-table query's
shared policy.
+ @Nullable
+ public FilterContext getRowFilter(IndexSegment segment) {
+ if (_segmentRowFilters.isEmpty()) {
+ return _rowFilter;
+ }
+ SegmentRowFilter rowFilter = _segmentRowFilters.get(segment);
+ return rowFilter != null ? rowFilter.filter() : null;
+ }
+
+ /// Returns a backing table policy and the schema used to resolve virtual
columns in it.
+ @Nullable
+ public SegmentRowFilter getSegmentRowFilter(IndexSegment segment) {
+ return _segmentRowFilters.get(segment);
+ }
+
+ /// Returns whether any scan in this query has a row-level security filter.
+ public boolean hasRowFilter() {
Review Comment:
Fixed both paths in 5ccc68d543. A segment row policy now disables
dictionary-only DISTINCT and count-based pruning, including ORDER BY. Added
regressions for both and a broker test that checks the physical-table policy
and the server capability gate. Rebased on master and ran 80 focused tests
successfully, including AndDocIdSetPushdownTest.
--
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]