Parquet: Filter pushdown throws UnsupportedOperationException for decimal and UUID predicates
- Dominant language
- Java
- Stars
- 9.2k
- Forks
- 3.5k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 132
Description
### Apache Iceberg version
1.10.1 (latest release)
### Query engine
Other
### Please describe the bug 🐞
`ParquetFilters.getParquetPrimitive()` (line 223) has a TODO:
```java
// TODO: this needs to convert to handle BigDecimal and UUID
```
The method handles `Number`, `CharSequence`, and `ByteBuffer` literal types, but does not handle `BigDecimal` (used for Iceberg `decimal` type) or `UUID`. When a predicate on a decimal or UUID column reaches the Parquet filter pushdown path, the method throws:
```
UnsupportedOperationException: Type not supported yet: java.math.BigDecimal
```
This prevents filter pushdown for decimal/UUID columns and can crash queries instead of gracefully falling back to post-scan filtering.
### Expected behavior
- `BigDecimal` should be converted to Parquet's `Binary` representation (fixed-length byte array with unscaled value)
- `UUID` should be converted to a 16-byte `Binary` (or the appropriate Parquet logical type representation)
- Alternatively, return `null` for unsupported types to skip pushdown gracefully rather than throwing
### Affected file
ParquetFilters.java (line 223–234)
### Willingness to contribute
- [x] I can contribute a fix for this bug independently
- [ ] I would be willing to contribute a fix for this bug with guidance from the Iceberg community
- [ ] I cannot contribute a fix for this bug at this time
Contributor guide
Assessment
This issue has not been assessed yet.