Nightly upstream merge - #23
Conversation
Add `query.max-output-data-size` configuration property Enforce a maximum limit on the output data size a query can produce during execution. If a query exceeds this limit, execution is terminated with the `EXCEEDED_OUTPUT_LIMIT` error code.
Use the input scale for the overflow contribution when reconstructing the decimal sum. Previously only the wrapped 128-bit value was scaled, leading to incorrect averages or spurious overflow failures.
Skip unread Parquet pages when column indexes are present. Pass the predicate into ParquetReader unconditionally. DELETE, UPDATE, MERGE, and $row_id skip pages and still match skip-off results. Tests extend Hive BaseTestParquetPageSkipping and append Hive fixtures as Iceberg DataFiles.
Pages were charged at getSizeInBytes, which excludes the unused capacity of the backing arrays left by block builders. Pages with excess retained bytes are now compacted once.
Filters finish before projections are evaluated, but keeping their row selection entirely in PageProcessor prevents capable lazy sources from avoiding work for rejected projected values. Applying every selection is also unsafe: when a source must decode the full block, remapping the page can replace compact projection output with a slower indirect representation. Offer the selection as an atomic operation. Sources accept only when they can avoid loading or decoding data; rejection preserves the existing projection path. Materialize known filter inputs before entering generated code so reader implementations do not interfere with optimizing the filter loop.
Masking a fully decoded block preserves semantics, but it does not provide late materialization because rejected values still incur decode and allocation costs. Allow flat primitive readers to consume ascending selected positions directly. Unsupported readers and selection shapes retain the existing full-read path.
Selected reads still pay decompression and decoding costs for pages that contain no selected values, leaving much of the sparse-read benefit unrealized. Allow flat readers to identify and bypass complete unselected data pages with bounded lookahead. Before advancing the chunk stream, copy only the buffered page that still aliases source-owned input. This keeps ownership local to the page reader without cross-layer reference tracking.
Selected decoding adds seek and run-processing overhead, so applying it to every filtered page can regress dense or fragmented selections. Masking a page after choosing a full read can also change downstream block representation without avoiding any reader work. Accept an engine selection only when at least one unloaded column will use row- or page-level skipping. Choose those modes only when encoding, physical type, null statistics, selectivity, run geometry, and confirmed skipped page bytes predict a meaningful gain. Otherwise leave the source page unchanged so projections retain the existing compact path.
The selection policy spans several cost regimes and cannot be justified by a single type or selectivity measurement. Provide a Zstandard benchmark covering encoding, value width, null layout, selection locality, page geometry, and projected column count. Compare full reads, forced selection, and the production decision while exposing page and policy counters.
Currently, `concat(a_char, a_char, a_char...)` works. It works by coercing `char` values to `varchar` (trimming trailing spaces), and so is not consistent with `concat(a_char, a_char)` which retains trailing spaces. If we were to act upon the TODO being removed, we would need to add implement `concat(a_char, a_char, a_char...)` consistently with the 2-arg version, so preserving the trailing spaces. This would be semantically breaking change though.
Bumps [com.azure:azure-core-tracing-opentelemetry](https://github.com/Azure/azure-sdk-for-java) from 1.0.0-beta.65 to 1.0.0-beta.66. - [Release notes](https://github.com/Azure/azure-sdk-for-java/releases) - [Commits](Azure/azure-sdk-for-java@azure-core-experimental_1.0.0-beta.65...com.azure+azure-core-experimental_1.0.0-beta.66) --- updated-dependencies: - dependency-name: com.azure:azure-core-tracing-opentelemetry dependency-version: 1.0.0-beta.66 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
bill-ph
left a comment
There was a problem hiding this comment.
Reviewed the current head and upstream merge scope. No P0 blockers requiring code changes found. CI is still in progress with no failures reported so far.
— Robo Bill
benben
left a comment
There was a problem hiding this comment.
Automated review generated on behalf of @benben.
Approve. Fast-forward style merge of 18 upstream trinodb/trino commits (Parquet selected-positions pushdown, page skipping, TopN retained-size accounting, query.max-output-data-size, dependency bumps) into the PostHog ducklake fork with no conflict resolutions. Fork-specific code (ducklake plugin, ColumnReaderFactory MILLIS decoder, ParquetPageSourceFactory ColumnsForFile) is untouched by upstream, and the ducklake positional-delete filter composes correctly with the new ParquetSourcePage.trySelectPositions path.
- minor
plugin/trino-ducklake/src/main/java/io/trino/plugin/ducklake/DuckLakePageSourceProvider.java:511Delete filter now composes with new engine position pushdown; untested in fork. PR only compiled the module; DELETE followed by filtered SELECT on the same file exercises the new ParquetSourcePage.trySelectPositions composition.
Model: fable.
Merge current
trinodb/trinomaster into the PostHog ducklake fork.Sanity build:
Result: BUILD SUCCESS.