Trino
Two merged contributions to the distributed SQL engine: a documentation fix and retaining Iceberg column statistics after snapshot expiration.
- Role
- Contributor
- When
- September 2026 to present
- Stack
- Java, Apache Iceberg, SQL
Context
Trino is a distributed SQL engine that queries data where it lives: data lakes, relational databases and object storage. It is a common companion to Apache Superset when one dashboard needs data from several sources.
What I contributed
Documentation fixes (#31130, merged). A set of typos across ten pages of the documentation, including a wrong procedure name in the file system access control page (delta.sytem.vacuum instead of delta.system.vacuum) that would fail if copied into a configuration file.
Retaining NDV statistics across snapshot expiration (#31546, merged). The Iceberg connector stores the number of distinct values (NDV) per column in a Puffin statistics file attached to a table snapshot. When MERGE, UPDATE or DELETE creates a new snapshot, no statistics file is written for it. Trino can still find the old file by walking back through the snapshot history, but once expire_snapshots removes that older snapshot the statistics are gone until someone runs a full ANALYZE. Worse, later INSERT operations only update NDV for columns that already have an estimate, so the loss is permanent.
The merged change carries the existing GenericStatisticsFile forward onto currentSnapshotId when a row-level write finishes (mirroring OPTIMIZE), ensuring executeExpireSnapshots preserves statistics with zero unnecessary file I/O overhead. Verified via TestIcebergFileOperations.testExpireSnapshotsDoesNotReadOrWriteStatisticsFiles.
Status
Both the documentation fix and the Iceberg statistics retention PR are merged upstream.
Pull requests
2 merged, 0 open, 1 closed. Status synced from GitHub.