Repository navigation
pgduck: expose BuildIcebergReadConversion on release-3.5 - #734
Merged
sfc-gh-okalaci merged 1 commit intoOct 12, 2026
Merged
sfc-gh-okalaci merged 1 commit into
sfc-gh-okalaci merged 1 commit into
Conversation
Iceberg stores an INTERVAL as a struct of months/days/microseconds and a TIMETZ as a UTC-normalized TIME. BuildIcebergReadConversion builds the DuckDB expression that lifts those leaves back to the types PostgreSQL expects, recursing through arrays, composites, maps and domains. The read path applies it to anything projected through TupleDescToProjectionList. A caller that reads the CSV files directly, building its own query rather than going through that projection, has no way to apply the conversion itself. Its input functions then get the storage form: interval_in receives "(38,5,14706789000)", and a TIMETZ stripped to a bare TIME is reinterpreted against the caller session's TimeZone, shifting the instant by that session's offset without raising anything -- a silent wrong answer, and one that is invisible on a UTC cluster. Declare it in read_data.h so such a caller can build the same expression the read path builds. The body and both in-repo callers are unchanged, so this adds visibility rather than code. Signed-off-by: Amy Zheng <amy.zheng@snowflake.com> (cherry picked from commit 74626e9)
sfc-gh-okalaci
requested review from
sfc-gh-abozkurt,
sfc-gh-amzheng,
sfc-gh-dachristensen,
sfc-gh-mslot and
sfc-gh-npuka
as code owners
October 12, 2026 13:49
sfc-gh-okalaci
deleted the
okalaci/release-3.5-export-iceberg-read-conversion
branch
October 12, 2026 13:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
release-3.5soBuildIcebergReadConversionis declared and no longer static.Test plan
pg_lake_engine/include/pg_lake/pgduck/read_data.hand the definition inread_data.cis no longerstaticpg_lake_enginebuilds on this branchMade with Cursor