use of io.druid.query.filter.BoundDimFilter in project druid by druid-io.
the class BoundFilterTest method testNumericMatchVirtualColumn.
@Test
public void testNumericMatchVirtualColumn() {
assertFilterMatches(new BoundDimFilter("expr", "1", "2", false, false, false, null, StringComparators.NUMERIC), ImmutableList.of("0", "1", "2", "3", "4", "5", "6", "7"));
assertFilterMatches(new BoundDimFilter("expr", "2", "3", false, false, false, null, StringComparators.NUMERIC), ImmutableList.<String>of());
}
use of io.druid.query.filter.BoundDimFilter in project druid by druid-io.
the class BoundFilterTest method testLexicographicMatchNull.
@Test
public void testLexicographicMatchNull() {
assertFilterMatches(new BoundDimFilter("dim0", "", "", false, false, false, null, StringComparators.LEXICOGRAPHIC), ImmutableList.<String>of());
assertFilterMatches(new BoundDimFilter("dim1", "", "", false, false, false, null, StringComparators.LEXICOGRAPHIC), ImmutableList.of("0"));
assertFilterMatches(new BoundDimFilter("dim2", "", "", false, false, false, null, StringComparators.LEXICOGRAPHIC), ImmutableList.of("1", "2", "5"));
}
use of io.druid.query.filter.BoundDimFilter in project druid by druid-io.
the class BoundFilterTest method testLexicographicMatchMissingColumn.
@Test
public void testLexicographicMatchMissingColumn() {
assertFilterMatches(new BoundDimFilter("dim3", "", "", false, false, false, null, StringComparators.LEXICOGRAPHIC), ImmutableList.of("0", "1", "2", "3", "4", "5", "6", "7"));
assertFilterMatches(new BoundDimFilter("dim3", "", "", true, false, false, null, StringComparators.LEXICOGRAPHIC), ImmutableList.<String>of());
assertFilterMatches(new BoundDimFilter("dim3", "", "", false, true, false, null, StringComparators.LEXICOGRAPHIC), ImmutableList.<String>of());
assertFilterMatches(new BoundDimFilter("dim3", "", null, false, true, false, null, StringComparators.LEXICOGRAPHIC), ImmutableList.of("0", "1", "2", "3", "4", "5", "6", "7"));
assertFilterMatches(new BoundDimFilter("dim3", null, "", false, false, false, null, StringComparators.LEXICOGRAPHIC), ImmutableList.of("0", "1", "2", "3", "4", "5", "6", "7"));
assertFilterMatches(new BoundDimFilter("dim3", null, "", false, true, false, null, StringComparators.LEXICOGRAPHIC), ImmutableList.<String>of());
}
use of io.druid.query.filter.BoundDimFilter in project druid by druid-io.
the class BoundFilterTest method testAlphaNumericMatchTooStrict.
@Test
public void testAlphaNumericMatchTooStrict() {
assertFilterMatches(new BoundDimFilter("dim1", "2", "2", true, false, true, null, StringComparators.ALPHANUMERIC), ImmutableList.<String>of());
assertFilterMatches(new BoundDimFilter("dim1", "2", "2", true, true, true, null, StringComparators.ALPHANUMERIC), ImmutableList.<String>of());
assertFilterMatches(new BoundDimFilter("dim1", "2", "2", false, true, true, null, StringComparators.ALPHANUMERIC), ImmutableList.<String>of());
}
use of io.druid.query.filter.BoundDimFilter in project druid by druid-io.
the class BoundFilterTest method testAlphaNumericMatchWithNegatives.
@Test
public void testAlphaNumericMatchWithNegatives() {
assertFilterMatches(new BoundDimFilter("dim1", "-2000", "3", true, true, true, null, StringComparators.ALPHANUMERIC), ImmutableList.<String>of());
assertFilterMatches(new BoundDimFilter("dim1", "3", "-2000", true, true, true, null, StringComparators.ALPHANUMERIC), ImmutableList.of("1", "6", "7"));
}
Aggregations