use of io.druid.query.filter.BoundDimFilter in project druid by druid-io.
the class BoundFilterTest method testNumericMatchNull.
@Test
public void testNumericMatchNull() {
assertFilterMatches(new BoundDimFilter("dim0", "", "", false, false, false, null, StringComparators.NUMERIC), ImmutableList.<String>of());
assertFilterMatches(new BoundDimFilter("dim1", "", "", false, false, false, null, StringComparators.NUMERIC), ImmutableList.of("0"));
assertFilterMatches(new BoundDimFilter("dim2", "", "", false, false, false, null, StringComparators.NUMERIC), ImmutableList.of("1", "2", "5"));
assertFilterMatches(new BoundDimFilter("dim3", "", "", false, false, false, null, StringComparators.NUMERIC), ImmutableList.of("0", "1", "2", "3", "4", "5", "6", "7"));
}
use of io.druid.query.filter.BoundDimFilter in project druid by druid-io.
the class BoundFilterTest method testAlphaNumericMatchNull.
@Test
public void testAlphaNumericMatchNull() {
assertFilterMatches(new BoundDimFilter("dim0", "", "", false, false, true, null, StringComparators.ALPHANUMERIC), ImmutableList.<String>of());
assertFilterMatches(new BoundDimFilter("dim1", "", "", false, false, true, null, StringComparators.ALPHANUMERIC), ImmutableList.of("0"));
assertFilterMatches(new BoundDimFilter("dim2", "", "", false, false, true, null, StringComparators.ALPHANUMERIC), ImmutableList.of("1", "2", "5"));
assertFilterMatches(new BoundDimFilter("dim3", "", "", false, false, true, null, StringComparators.ALPHANUMERIC), ImmutableList.of("0", "1", "2", "3", "4", "5", "6", "7"));
}
use of io.druid.query.filter.BoundDimFilter in project druid by druid-io.
the class BoundFilterTest method testAlphaNumericMatchNoUpperLimit.
@Test
public void testAlphaNumericMatchNoUpperLimit() {
assertFilterMatches(new BoundDimFilter("dim1", "1", null, true, true, true, null, StringComparators.ALPHANUMERIC), ImmutableList.of("1", "2", "4", "5", "6", "7"));
assertFilterMatches(new BoundDimFilter("dim1", "-1", null, true, true, true, null, StringComparators.ALPHANUMERIC), ImmutableList.of("4", "5", "6", "7"));
}
use of io.druid.query.filter.BoundDimFilter in project druid by druid-io.
the class BoundFilterTest method testNumericMatchExactlySingleValue.
@Test
public void testNumericMatchExactlySingleValue() {
assertFilterMatches(new BoundDimFilter("dim1", "2", "2", false, false, false, null, StringComparators.NUMERIC), ImmutableList.of("2"));
assertFilterMatches(new BoundDimFilter("dim1", "-10.012", "-10.012", false, false, false, null, StringComparators.NUMERIC), ImmutableList.of("7"));
}
use of io.druid.query.filter.BoundDimFilter in project druid by druid-io.
the class BoundFilterTest method testNumericMatchTooStrict.
@Test
public void testNumericMatchTooStrict() {
assertFilterMatches(new BoundDimFilter("dim1", "2", "2", true, false, false, null, StringComparators.NUMERIC), ImmutableList.<String>of());
assertFilterMatches(new BoundDimFilter("dim1", "2", "2", true, true, false, null, StringComparators.NUMERIC), ImmutableList.<String>of());
assertFilterMatches(new BoundDimFilter("dim1", "2", "2", false, true, false, null, StringComparators.NUMERIC), ImmutableList.<String>of());
}
Aggregations