laserninja opened a new issue, #16033:
URL: https://github.com/apache/iceberg/issues/16033
### Apache Iceberg version
1.10.1 (latest release)
### Query engine
Other
### Please describe the bug 🐞
`PuffinFormat.FOOTER_COMPRESSION_CODEC` is hardcoded to
`PuffinCompressionCodec.LZ4` (line 86), and
`Puffin.WriteBuilder.compressFooter()` enables footer compression. However,
both `PuffinFormat.compress()` and `PuffinFormat.decompress()` fall through to
`throw new UnsupportedOperationException("Unsupported codec: lz4")` for the LZ4
case:
```java
case LZ4:
// TODO requires LZ4 frame compressor, e.g.
// https://github.com/airlift/aircompressor/pull/142
break;
```
This means:
1. Any user calling `Puffin.write(outputFile).compressFooter()` gets an
`UnsupportedOperationException` at write time with no compile-time warning.
2. Reading any Puffin file written with LZ4 footer compression (e.g., from
another implementation) will also fail.
The referenced aircompressor PR
(https://github.com/airlift/aircompressor/pull/142) has been merged, so the
dependency is available.
### Expected behavior
Either:
- Implement LZ4 frame compression/decompression using the now-available
aircompressor library, or
- Throw a clear error in `Puffin.WriteBuilder.compressFooter()` indicating
LZ4 is not yet supported, rather than failing deep in the write path
### Affected files
- PuffinFormat.java (lines 86, 111–114, 133–135)
- Puffin.java (line 69–70)
### 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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]