wjhypo commented on a change in pull request #9810:
URL: https://github.com/apache/druid/pull/9810#discussion_r462614783
##########
File path:
server/src/test/java/org/apache/druid/client/CachingClusteredClientTest.java
##########
@@ -1541,6 +1543,135 @@ public void testSingleDimensionPruning()
Assert.assertEquals(expected, ((TimeseriesQuery)
capture.getValue().getQuery()).getQuerySegmentSpec());
}
+ @Test
+ public void testHashBasedPruning()
+ {
+ DimFilter filter = new AndDimFilter(
+ new SelectorDimFilter("dim1", "a", null),
+ new BoundDimFilter("dim2", "e", "zzz", true, true, false, null,
StringComparators.LEXICOGRAPHIC),
+ // Equivalent filter of dim3 below is InDimFilter("dim3",
Arrays.asList("c"), null)
+ new AndDimFilter(
+ new InDimFilter("dim3", Arrays.asList("a", "c", "e", "g"), null),
+ new BoundDimFilter("dim3", "aaa", "ddd", false, false, false,
null, StringComparators.LEXICOGRAPHIC)
+ )
+ );
+
+ final Druids.TimeseriesQueryBuilder builder =
Druids.newTimeseriesQueryBuilder()
+
.dataSource(DATA_SOURCE)
+ .filters(filter)
+
.granularity(GRANULARITY)
+ .intervals(SEG_SPEC)
+ .context(CONTEXT)
+
.intervals("2011-01-05/2011-01-10")
+
.aggregators(RENAMED_AGGS)
+
.postAggregators(RENAMED_POST_AGGS);
Review comment:
👍 Pushed a fix. Also thanks for the wiki, I will avoid force pushes in
the future.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]