use of org.apache.flink.orc.OrcFilters.Between in project flink by apache.
the class OrcColumnarRowInputFormatTest method testReadFileAndRestoreWithFilter.
@Test
public void testReadFileAndRestoreWithFilter() throws IOException {
List<Predicate> filter = Collections.singletonList(new Or(new Between("_col0", PredicateLeaf.Type.LONG, 0L, 975000L), new Equals("_col0", PredicateLeaf.Type.LONG, 980001L), new Between("_col0", PredicateLeaf.Type.LONG, 990000L, 1800000L)));
OrcColumnarRowInputFormat<?, FileSourceSplit> format = createFormat(FLAT_FILE_TYPE, new int[] { 0, 1 }, filter);
// pick a middle split
FileSourceSplit split = createSplits(flatFile, 1).get(0);
int breakCnt = 975001;
int expectedCnt = 1795000;
long expectedTotalF0 = 1615113397500L;
innerTestRestore(format, split, breakCnt, expectedCnt, expectedTotalF0);
}
Aggregations