apache / apache/iceberg

Parquet: Filter pushdown throws UnsupportedOperationException for decimal and UUID predicates

Open
#16,035 2 comments 0 reactions 0 assignees View on GitHub
bug
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.