DomGarguilo commented on code in PR #3968:
URL: https://github.com/apache/accumulo/pull/3968#discussion_r1442174226
##########
test/src/main/java/org/apache/accumulo/test/functional/AmpleConditionalWriterIT.java:
##########
@@ -851,6 +872,188 @@ public void testTime() {
}
}
+ @Nested
+ public class TestFilter {
+
+ /**
+ * @param filters set of filters to apply to the readTablets operation
+ * @param expectedTablets set of tablets expected to be returned with the
filters applied
+ */
+ private void testFilterApplied(ServerContext context,
Set<TabletMetadataFilter> filters,
+ Set<KeyExtent> expectedTablets, String message) {
+ TabletsMetadata.TableRangeOptions options =
context.getAmple().readTablets().forTable(tid);
+ // add the filter(s) to the operation before building
+ for (TabletMetadataFilter filter : filters) {
+ options.filter(filter);
+ // fetch the columns that the filter needs to evaluate. not necessary
but makes the call
+ // more refined.
+ for (TabletMetadata.ColumnType columnType : filter.getColumns()) {
+ options.fetch(columnType);
Review Comment:
I added this just as an optimization of sorts. Not sure it is testing
anything new. Do you think it is worth keeping and if so, testing twice, with
and without fetching as you suggested? @keith-turner
--
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]