Skip to content

Parquet: Fix boolean filter pushdown UnsupportedOperationException#17093

Open
thswlsqls wants to merge 1 commit into
apache:mainfrom
thswlsqls:fix/parquet-boolean-filter-unsupported-type
Open

Parquet: Fix boolean filter pushdown UnsupportedOperationException#17093
thswlsqls wants to merge 1 commit into
apache:mainfrom
thswlsqls:fix/parquet-boolean-filter-unsupported-type

Conversation

@thswlsqls

Copy link
Copy Markdown
Contributor

Closes #17092

Summary

  • ParquetFilters.getParquetPrimitive() handled Number, CharSequence, and ByteBuffer literals but not Boolean, so EQ/NOT_EQ predicates on boolean columns threw UnsupportedOperationException while building the Parquet read builder, failing the read before any rows were returned.
  • Adds Boolean to the existing Number branch (direct cast, same pattern), since FilterApi.eq(BooleanColumn, Boolean) expects the literal as-is.
  • No other literal types (decimal/UUID, handled separately in open PR Parquet: Fix decimal and UUID filter pushdown conversion #16621) are touched.

Testing done

  • Added TestParquet#booleanEqualityFilterPushdown and TestParquet#booleanInequalityFilterPushdown, each writing a boolean-column Parquet file and reading it back through Parquet.read(...).filter(...), asserting the correct rows are returned instead of throwing.
  • ./gradlew :iceberg-parquet:check — 705 tests passed (0 failures/errors), spotlessCheck/checkstyle/revapi included.
  • ./gradlew :iceberg-parquet:revapi — passed (no public API change; ParquetFilters is package-private, getParquetPrimitive is private static).

ParquetFilters.getParquetPrimitive() only handled Number, CharSequence,
and ByteBuffer literals, so EQ/NOT_EQ predicates on boolean columns
threw UnsupportedOperationException at read-builder construction time
instead of returning the matching rows. Boolean literals now take the
same cast-and-return path already used for Number.

Generated-by: Claude Code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parquet: boolean equality filter pushdown throws UnsupportedOperationException

1 participant