use of com.facebook.presto.hive.HiveCoercer.IntegerNumberToVarcharCoercer in project presto by prestodb.
the class TestCoercingFilters method testIntegerToVarchar.
@Test
public void testIntegerToVarchar() {
TupleDomainFilter filter = BytesRange.of("10".getBytes(), false, "10".getBytes(), false, false);
HiveCoercer coercer = new IntegerNumberToVarcharCoercer(INTEGER, VARCHAR);
TupleDomainFilter coercingFilter = coercer.toCoercingFilter(filter, new Subfield("c"));
assertTrue(coercingFilter.testLong(10));
assertFalse(coercingFilter.testLong(25));
assertFalse(coercingFilter.testNull());
}
Aggregations