Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parquet: Make row-group filters cooperate to filter #10090

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Switch to AssertJ and Junit5.
  • Loading branch information
zhongyujiang committed Jun 30, 2024
commit 76ec914223302f9baf4cfe3fa8c10ff67de9e604
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ public void testTransformFilter() {

@Test
public void testParquetFindsResidual() {
Assume.assumeTrue("Only valid for Parquet", format == FileFormat.PARQUET);
Assumptions.assumeThat(format).isEqualTo(FileFormat.PARQUET);

Expression mightMatch = notEqual("some_nulls", "some");
Expression cannotMatch = equal("id", INT_MIN_VALUE - 25);
Expand All @@ -966,17 +966,15 @@ public void testParquetFindsResidual() {
new ParquetMetricsRowGroupFilter(SCHEMA, Expressions.or(mightMatch, cannotMatch), true);
Expression actual = filter.residualFor(parquetSchema, rowGroupMetadata);

Assert.assertTrue(
String.format("Expected actual: %s, actual: %s", expected.toString(), actual.toString()),
actual.isEquivalentTo(expected));
Assertions.assertThat(actual.isEquivalentTo(expected))
.overridingErrorMessage("Expected: %s, actual: %s", expected, actual);

filter =
new ParquetMetricsRowGroupFilter(SCHEMA, Expressions.and(mightMatch, cannotMatch), true);
expected = Expressions.alwaysFalse();
actual = filter.residualFor(parquetSchema, rowGroupMetadata);
Assert.assertTrue(
String.format("Expected actual: %s, actual: %s", expected.toString(), actual.toString()),
actual.isEquivalentTo(expected));
Assertions.assertThat(actual.isEquivalentTo(expected))
.overridingErrorMessage("Expected: %s, actual: %s", expected, actual);
}

private boolean shouldRead(Expression expression) {
Expand Down