Search in sources :

Example 6 with DoubleColumn

use of org.apache.parquet.filter2.predicate.Operators.DoubleColumn in project parquet-mr by apache.

the class TestStatisticsFilter method testOr.

@Test
public void testOr() {
    FilterPredicate yes = eq(intColumn, 9);
    FilterPredicate no = eq(doubleColumn, 50D);
    assertTrue(canDrop(or(yes, yes), columnMetas));
    assertFalse(canDrop(or(yes, no), columnMetas));
    assertFalse(canDrop(or(no, yes), columnMetas));
    assertFalse(canDrop(or(no, no), columnMetas));
}
Also used : FilterPredicate(org.apache.parquet.filter2.predicate.FilterPredicate) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)6 FilterPredicate (org.apache.parquet.filter2.predicate.FilterPredicate)5 IntStatistics (org.apache.parquet.column.statistics.IntStatistics)2 DoubleColumn (org.apache.parquet.filter2.predicate.Operators.DoubleColumn)2 DoubleStatistics (org.apache.parquet.column.statistics.DoubleStatistics)1 Group (org.apache.parquet.example.data.Group)1 BinaryColumn (org.apache.parquet.filter2.predicate.Operators.BinaryColumn)1 User (org.apache.parquet.filter2.recordlevel.PhoneBookWriter.User)1 ColumnChunkMetaData (org.apache.parquet.hadoop.metadata.ColumnChunkMetaData)1