use of org.apache.druid.query.filter.ValueMatcher in project druid by druid-io.
the class PredicateValueMatcherFactoryTest method testComplexProcessorMatchingDouble.
@Test
public void testComplexProcessorMatchingDouble() {
final TestColumnValueSelector<Double> columnValueSelector = TestColumnValueSelector.of(Double.class, ImmutableList.of(11.d), DateTimes.nowUtc());
columnValueSelector.advance();
final ValueMatcher matcher = forSelector("11.d").makeComplexProcessor(columnValueSelector);
Assert.assertTrue(matcher.matches());
}
use of org.apache.druid.query.filter.ValueMatcher in project druid by druid-io.
the class PredicateValueMatcherFactoryTest method testComplexProcessorNotMatchingInteger.
@Test
public void testComplexProcessorNotMatchingInteger() {
final TestColumnValueSelector<Integer> columnValueSelector = TestColumnValueSelector.of(Integer.class, ImmutableList.of(15), DateTimes.nowUtc());
columnValueSelector.advance();
final ValueMatcher matcher = forSelector("11").makeComplexProcessor(columnValueSelector);
Assert.assertFalse(matcher.matches());
}
use of org.apache.druid.query.filter.ValueMatcher in project druid by druid-io.
the class PredicateValueMatcherFactoryTest method testComplexProcessorNotMatchingBoolean.
@Test
public void testComplexProcessorNotMatchingBoolean() {
final TestColumnValueSelector<String> columnValueSelector = TestColumnValueSelector.of(String.class, ImmutableList.of(true), DateTimes.nowUtc());
columnValueSelector.advance();
final ValueMatcher matcher = forSelector("false").makeComplexProcessor(columnValueSelector);
Assert.assertFalse(matcher.matches());
}
use of org.apache.druid.query.filter.ValueMatcher in project druid by druid-io.
the class PredicateValueMatcherFactoryTest method testComplexProcessorMatchingFloat.
@Test
public void testComplexProcessorMatchingFloat() {
final TestColumnValueSelector<Float> columnValueSelector = TestColumnValueSelector.of(Float.class, ImmutableList.of(11.f), DateTimes.nowUtc());
columnValueSelector.advance();
final ValueMatcher matcher = forSelector("11.f").makeComplexProcessor(columnValueSelector);
Assert.assertTrue(matcher.matches());
}
use of org.apache.druid.query.filter.ValueMatcher in project druid by druid-io.
the class PredicateValueMatcherFactoryTest method testLongProcessorNotMatchingValue.
@Test
public void testLongProcessorNotMatchingValue() {
final TestColumnValueSelector<Long> columnValueSelector = TestColumnValueSelector.of(Long.class, ImmutableList.of(2L), DateTimes.nowUtc());
columnValueSelector.advance();
final ValueMatcher matcher = forSelector("5").makeLongProcessor(columnValueSelector);
Assert.assertFalse(matcher.matches());
}
Aggregations