[default values] Implement ReadBridge.apply without an Iceberg fork - #679
Open
cbb330 wants to merge 4 commits into
Open
[default values] Implement ReadBridge.apply without an Iceberg fork#679cbb330 wants to merge 4 commits into
cbb330 wants to merge 4 commits into
Conversation
6 tasks
cbb330
force-pushed
the
chbush/read-bridge-apply
branch
2 times, most recently
from
August 12, 2026 23:44
27edc5d to
4f25ef4
Compare
cbb330
force-pushed
the
chbush/read-bridge-apply
branch
from
August 12, 2026 23:57
4f25ef4 to
e68a724
Compare
cbb330
force-pushed
the
chbush/read-bridge-apply
branch
from
August 13, 2026 00:19
e68a724 to
171134f
Compare
cbb330
force-pushed
the
chbush/read-bridge-apply
branch
from
August 13, 2026 00:37
171134f to
7829367
Compare
cbb330
force-pushed
the
chbush/read-bridge-apply
branch
from
August 13, 2026 02:36
7829367 to
a79c316
Compare
cbb330
force-pushed
the
chbush/read-bridge-apply
branch
3 times, most recently
from
August 13, 2026 05:29
01a1468 to
3793274
Compare
17 tasks
cbb330
force-pushed
the
chbush/read-bridge-apply
branch
2 times, most recently
from
August 13, 2026 05:52
4c6f354 to
a64ea0f
Compare
cbb330
force-pushed
the
chbush/read-bridge-apply
branch
from
August 13, 2026 06:10
a64ea0f to
4be6d59
Compare
cbb330
changed the base branch from
chbush/read-bridge-sanitize-on-write
to
chbush/read-bridge-policy-ramp
August 13, 2026 22:27
cbb330
force-pushed
the
chbush/read-bridge-apply
branch
2 times, most recently
from
August 13, 2026 22:36
08551a4 to
145297f
Compare
cbb330
changed the base branch from
chbush/read-bridge-policy-ramp
to
chbush/read-bridge-sanitize-on-write
August 13, 2026 22:36
cbb330
force-pushed
the
chbush/read-bridge-apply
branch
from
August 13, 2026 23:56
145297f to
17b3d21
Compare
2 tasks
cbb330
force-pushed
the
chbush/read-bridge-apply
branch
from
August 14, 2026 04:43
17b3d21 to
d7edc72
Compare
cbb330
force-pushed
the
chbush/read-bridge-apply
branch
from
August 14, 2026 20:41
d7edc72 to
950f3f4
Compare
cbb330
force-pushed
the
chbush/read-bridge-apply
branch
from
August 19, 2026 20:44
950f3f4 to
78dd9dd
Compare
cbb330
force-pushed
the
chbush/read-bridge-apply
branch
from
August 20, 2026 15:08
78dd9dd to
a922b96
Compare
cbb330
force-pushed
the
chbush/read-bridge-apply
branch
5 times, most recently
from
August 22, 2026 00:30
0aa2f19 to
1fd3fe2
Compare
cbb330
force-pushed
the
chbush/read-bridge-apply
branch
from
August 25, 2026 22:59
1fd3fe2 to
8f3f655
Compare
cbb330
force-pushed
the
chbush/read-bridge-apply
branch
from
August 26, 2026 00:41
8f3f655 to
50ad16f
Compare
cbb330
added a commit
that referenced
this pull request
Aug 27, 2026
#678) ## Summary Depends on [#674](#674) (policy), stacked on [#668](#668) → [#645](#645). [#679](#679) (`ReadBridge.apply`) restacks on this PR. Read-bridge overlays must not persist. This PR puts the drop on the **server** *before* apply lands, so there is no deployable cut where overlays are applied but not stripped. Default-aware clients send `initial-default` on stamped field-ids (the handshake). The server gates Type 1 / Type 2, then strips those keys before Iceberg commit. Unstamped ids keep the writer's defaults. Until #679, apply is still a no-op; PUTs only carry `initial-default` if the writer set it. The server is already safe: drop is a no-op when the handshake is absent, and Type 2 fail-closes unaware rewrites on ramped tables. ## How strip protection works | Gate | When | Result | |---|---|---| | Type 1 | Ramped table; a previously stamped field-id is still in the schema but missing from incoming stamps | 400 `COLUMN_DEFAULT_REMOVED` | | Type 2 | Ramped rewrite (`replace` / `overwrite` on main) while previous stamps are nonempty | 400 `COLUMN_DEFAULT_REWRITE` unless each remaining id's `initial-default` JSON equals the stamp | | Unusable | Ramped write; source throw / unreadable schema / unreadable snapshots | 400 `COLUMN_DEFAULT_UNUSABLE` | | Drop | After gates pass | Remove `initial-default` on stamped ids (same `findParents("id")` walk as the client) | Unramped tables are a no-op. GET `resolve()` still fail-opens; only the write path is fail-closed. Awareness is `JsonNode.equals` against the stamped config, not key presence. OSS never parses ASL. `ColumnDefaultsSource` is the seam (`NONE` in OSS); LinkedIn fills it. Type 1 compares stamped field-id sets from the resolver. ## Changes - [x] New Features — `ReadBridgeStripProtection.prepare` on PUT table / snapshots - [x] Internal API Changes — resolver write APIs `stampedColumnDefaults` / `isRampedForCommit` - [x] Tests — unit Type 1/2/unusable, mock bean for `MockTablesApplication`, HTTP e2e that GET `initialDefault()` is null after overlay PUT ## Testing Done - [x] Added new tests for the changes made. - [x] Updated existing tests to reflect the changes made. - Local (Java 17): `./gradlew :services:tables:test --tests '*ReadBridgeStripProtectionTest' --tests '*ReadBridgeConfigResolverTest' --tests '*ReadBridgeColumnDefaultE2ETest'` ## Additional Information - [x] Large PR broken into smaller PRs, and PR plan linked in the description. ### Stack 1. [#645](#645) — substrate (seam + encode + decode hook) 2. [#668](#668) — decode off Iceberg’s retry path 3. [#674](#674) — policy / ramp in OpenHouse 4. **This PR** — handshake on PUT, Type 1/2, drop before persist 5. [#679](#679) — `ReadBridge.apply` (merge after this PR) 6. [#681](#681) — Spark catalog itest (overlay) ### Rollback Plan Revert this PR. After #679, clients send overlays; without the server drop they persist in Iceberg metadata.
Overlay stamped column defaults onto schema field objects by field-id using the sanitize JSON helpers.
Apply puts overlays on the in-memory schema; constructMetadataRequestBody must not strip them. Skip-reload still sends the bound overlay. Unstamped writer defaults stay on the wire.
cbb330
force-pushed
the
chbush/read-bridge-apply
branch
from
August 27, 2026 00:03
d0bedcb to
12b56df
Compare
mkuchenbecker
approved these changes
Aug 27, 2026
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
Depends on #678 (server handshake + drop), stacked on #674 → #668 → #645.
Finish the client half of the column-default read bridge: turn server-stamped
configinto IcebergNestedField.initialDefaultat metadata load — without forking Iceberg.#678 lands first so apply is never in tree without the drop. Overlays sit on
metadata.schema(); the first write after a bridged load would persist them unless the server already strips them.ReadBridge.from(config)indoRefresh/ before IOopenhouse.read-bridge.column-default.<fieldId>(kept from #668, off the retry path)ReadBridge.apply(raw)inloadMetadataHow apply works
Patch
initial-defaultonto schema field objects by field-id in metadata JSON. No Iceberg fork.Failure policy (mirrors the server encoder):
rawunchangedIllegalStateException)openhouse.read-bridge.*keySemantics notes:
Changes
ReadBridge.applyoverlaysinitialDefaultReadBridgeTest: single/multi-schema overlay, nested fields, gaps, fail-loud bind, inert path;OpenHouseTableOperationsTest: PUT still sends stampedinitial-defaultTesting Done
./gradlew :integrations:java:iceberg-1.2:openhouse-java-itest:test --tests '*ReadBridgeTest' --tests '*OpenHouseTableOperationsTest'Additional Information
Stack
ReadBridge.apply