use of org.apache.iceberg.expressions.Expression in project drill by apache.
the class TestFilterTransformer method testToFilterNot.
@Test
public void testToFilterNot() {
Expression expected = Expressions.not(Expressions.equal(MetastoreColumn.ROW_GROUP_INDEX.columnName(), 1));
Expression actual = transformer.transform(FilterExpression.not(FilterExpression.equal(MetastoreColumn.ROW_GROUP_INDEX, 1)));
assertEquals(expected.toString(), actual.toString());
}
use of org.apache.iceberg.expressions.Expression in project drill by apache.
the class TestFilterTransformer method testToFilterOr.
@Test
public void testToFilterOr() {
Expression expected = Expressions.or(Expressions.equal(MetastoreColumn.ROW_GROUP_INDEX.columnName(), 1), Expressions.equal(MetastoreColumn.ROW_GROUP_INDEX.columnName(), 2));
Expression actual = transformer.transform(FilterExpression.or(FilterExpression.equal(MetastoreColumn.ROW_GROUP_INDEX, 1), FilterExpression.equal(MetastoreColumn.ROW_GROUP_INDEX, 2)));
assertEquals(expected.toString(), actual.toString());
}
use of org.apache.iceberg.expressions.Expression in project drill by apache.
the class TestFilterTransformer method testToFilterMetadataTypesOne.
@Test
public void testToFilterMetadataTypesOne() {
Expression expected = Expressions.equal(MetastoreColumn.METADATA_TYPE.columnName(), MetadataType.PARTITION.name());
Expression actual = transformer.transform(Collections.singleton(MetadataType.PARTITION));
assertEquals(expected.toString(), actual.toString());
}
use of org.apache.iceberg.expressions.Expression in project drill by apache.
the class TestFilterTransformer method testToFilterGreaterThanOrEqual.
@Test
public void testToFilterGreaterThanOrEqual() {
Expression expected = Expressions.greaterThanOrEqual(MetastoreColumn.ROW_GROUP_INDEX.columnName(), 1);
Expression actual = transformer.transform(FilterExpression.greaterThanOrEqual(MetastoreColumn.ROW_GROUP_INDEX, 1));
assertEquals(expected.toString(), actual.toString());
}
use of org.apache.iceberg.expressions.Expression in project drill by apache.
the class TestFilterTransformer method testCombineOne.
@Test
public void testCombineOne() {
Expression expected = Expressions.equal("a", 1);
Expression actual = transformer.combine(expected);
assertEquals(expected.toString(), actual.toString());
}
Aggregations