Repository navigation
Conversation
| if (new_format_version < 1 || | ||
| new_format_version > TableMetadata::kSupportedTableFormatVersion) { |
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
5 open issues
Whenroot_manifestis absent,ValidateForFormatVersionreturns success without validating the… · New This nullsmanifest_listbased onsnapshot.manifest_list.empty()rather than on whether the… · New These checks use direct JSON access and type-agnostic comparisons (`json[\"last-constraint-id\"] !=… · New Validate upgrade versions before narrowing to int8_t The precondition message is overly generic given the branching logic. Whenlocationis empty, the… · New
Review effort: Lite
Introduce file tracking, deletion-vector references, and manifest summaries with schemas from the developing v4 specification. Keep v4 tracking statuses separate from legacy manifest statuses and retain the existing table-format support gate. Co-authored-by: Codex <codex@openai.com>
Accept format-version 4 for table creation, property upgrades and metadata JSON. Preserve optional table locations and root-manifest snapshots, retain legacy snapshots on upgrade, and validate v4 snapshot timestamps. Return explicit unsupported errors for unfinished manifest-tree I/O, constraints and primary-key migration. Cover catalog create/load/upgrade and staged creation alongside schema and serialization regressions. Co-authored-by: Codex <codex@openai.com>
Reject physical expiration cleanup before commit when v4 root manifests prevent reachability checks, and recheck final committed metadata before deleting files. Keep no-op expiration and CleanupLevel::kNone available. Pin the schema default-value fixture to v3 and cover retained roots, both cleanup levels and strategy selections, metadata-only expiration, and roots introduced after Apply. Co-authored-by: Codex <codex@openai.com>
Reject data-path derivation without a table base, preserve nullable UUID and v4 location parsing, classify parent timestamp failures as non-retryable, and allow upgrades before current-schema selection. Share snapshot format validation across metadata paths, expose root manifests in the snapshots metadata table, and avoid schema JSON copies outside the v4 identifier-field compatibility path. Co-authored-by: Codex <codex@openai.com>
Keep creation and upgrade version inputs as int32_t through the builder, update objects, catalog creation, and strict JSON decoding. Validate the supported range before storing the int8_t metadata version. Cover 260 and -252, signed integer bounds, cloned/decoded updates, and noninteger or out-of-range JSON values. Co-authored-by: Codex <codex@openai.com>
Reject empty legacy manifest lists across shared snapshot validation paths. Use root-manifest presence for inspection nulls and preserve projection support after the metadata table scan refactor. Give builder fixtures valid manifest paths. Strictly parse present v4 constraint arrays and integer IDs, and report actionable missing-location errors for each location provider. Co-authored-by: Codex <codex@openai.com>
ce26c99 to
60ecac1
Compare
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
9 open issues
This loop dereferencessnapshotunconditionally. Elsewhere in this PR (HasV4RootManifest)… · New ReturningNotSupportedfromFinalize()is risky because Finalize runs after the metadata update… · New Whenroot_manifestis absent,ValidateForFormatVersionreturns success without validating the…constraint-statusesis not type-validated. For malformed JSON (e.g., boolean/number/object), this… · New These checks use direct JSON access and type-agnostic comparisons (`json[\"last-constraint-id\"] !=… This nullsmanifest_listbased onsnapshot.manifest_list.empty()rather than on whether the… Validate upgrade versions before narrowing to int8_tType()allocates a newStructType(and vector) every call. These schema objects are typically… · New The precondition message is overly generic given the branching logic. Whenlocationis empty, the…
Review effort: Lite
Restore the original builder, table update, and catalog version types. Check upgrade JSON integers directly against the int8_t range before constructing an update. Adjust API tests to use representable unsupported values and retain JSON regressions for 260, -252, wider integers, and noninteger values. Co-authored-by: Codex <codex@openai.com>
Reject null snapshots before metadata serialization and strictly decode optional snapshot constraint-status arrays. Cache the fixed v4 schemas without changing their public return types. Treat v4 roots encountered after a successful expiration commit as a successful cleanup no-op. Cover both cleanup levels and prevent false finalization failure warnings. Co-authored-by: Codex <codex@openai.com>
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
11 open issues
ReturningNotSupportedfromFinalize()is risky because Finalize runs after the metadata update… This loop dereferencessnapshotunconditionally. Elsewhere in this PR (HasV4RootManifest)… Whenroot_manifestis absent,ValidateForFormatVersionreturns success without validating the… This still decodesformat-versionfor the upgrade action asint8_t, which narrows during JSON… · Newconstraint-statusesis not type-validated. For malformed JSON (e.g., boolean/number/object), this… These checks use direct JSON access and type-agnostic comparisons (`json[\"last-constraint-id\"] !=… This nullsmanifest_listbased onsnapshot.manifest_list.empty()rather than on whether the… Validate upgrade versions before narrowing to int8_t The new precondition error is actionable but doesn’t indicate how to resolve it. Consider expanding… · NewType()allocates a newStructType(and vector) every call. These schema objects are typically… The precondition message is overly generic given the branching logic. Whenlocationis empty, the…
Review effort: Lite
| } | ||
| if (action == kActionAddSchema) { | ||
| ICEBERG_ASSIGN_OR_RAISE(auto schema_json, | ||
| GetJsonValue<nlohmann::json>(json, kSchema)); | ||
| ICEBERG_ASSIGN_OR_RAISE(auto parsed_schema, SchemaFromJson(schema_json)); |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain that require resolution before approval.
3 open issues
8 resolved since last review
ReturningNotSupportedfromFinalize()is risky because Finalize runs after the metadata update… This loop dereferencessnapshotunconditionally. Elsewhere in this PR (HasV4RootManifest)… Whenroot_manifestis absent,ValidateForFormatVersionreturns success without validating the…constraint-statusesis not type-validated. For malformed JSON (e.g., boolean/number/object), this… These checks use direct JSON access and type-agnostic comparisons (`json[\"last-constraint-id\"] !=… This nullsmanifest_listbased onsnapshot.manifest_list.empty()rather than on whether the…Type()allocates a newStructType(and vector) every call. These schema objects are typically… The precondition message is overly generic given the branching logic. Whenlocationis empty, the…
Review effort: Balanced
Reject lossy identifier writes, preserve nullable constraint defaults, and validate stale snapshot sequences before parent timestamps. Parse table snapshots once against their real format version. Warn when postcommit v4 cleanup is skipped and reject unsupported schema and spec pruning before commit. Share location validation and the root predicate on TableMetadata, use feature-version constants, and simplify tracking-status decoding. Co-authored-by: Codex <codex@openai.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Human assessment is needed because concurrent v4 root commits can invalidate planned metadata pruning, potentially removing a required spec despite the finalization guard.
2 open issues
1 resolved since last review
Review effort: Balanced



C++ rejects
format-version: 4table metadata. This draft adds version 4 metadata creation, loading, upgrades, and JSON round trips, together with the fixed-schema building blocks for the developing v4 manifest tree. The default table version remains 2.format-versionproperty without persisting it as an ordinary table property, and support upgrades while preserving older snapshots'manifest-listreferences. Schema selection may follow the version upgrade.root-manifestsnapshot references. Share snapshot validation between parsing, table metadata serialization, and new-snapshot addition. Metadata parsing passes its format version explicitly and validates each snapshot once. Reject null snapshot entries before serialization. New v4 snapshots require roots; legacy snapshots retain non-empty manifest lists after an upgrade. Stale sequence numbers are checked first and remain retryable; parent timestamp failures with a fresh sequence are non-retryable validation errors.root_manifestin the snapshots metadata table, with a nullmanifest_listonly for root snapshots. Existing column positions and field IDs are preserved, and both manifest columns support the metadata scan projection API.FileTracking,DeletionVectorMetadata, andManifestInfodata carriers with the spec's exact schemas, reusing one cached schema instance per type. Keep v4 tracking statuses separate from legacy manifest statuses.int8_tformat-version interfaces. Strict JSON integer decoding rejects out-of-range and noninteger version values before conversion toint8_t. Ignore legacy identifier fields when reading v4 schemas. Reject writing current or historical schemas that still contain identifier fields until primary-key migration is supported, rather than silently dropping those fields.CleanupLevel::kNoneremain available when expired-schema/spec pruning is disabled.CleanExpiredMetadata(true)with v4 roots is explicitly rejected before commit, including withkNone, because pruning also requires manifest-tree traversal.Absent or null v4 constraints, constraint IDs, and snapshot constraint statuses use their defaults. Incorrect JSON types return parse errors; non-empty constraint/status arrays and nonzero constraint IDs remain explicitly unsupported. Table metadata owns the shared root-manifest predicate and location-validation rule. A missing table base for metadata writes reports the explicit metadata-path property as an alternative.
The v4 spec is still under development. This is a metadata foundation: v4 manifest-tree reads/writes, constraints, and identifier-to-primary-key migration return explicit unsupported errors. Typed content statistics, the full
TrackedFileschema, column/file types, relative-path resolution for file I/O, and tree planning/I/O remain follow-ups.Validation: based on
mainatd8ba4f6dand built in an isolated macOS Debug build with AppleClang 21,ICEBERG_BUILD_BUNDLE=ON, andICEBERG_CXX20_COMPAT=ON. Arrow/Parquet 25 dependencies came from the existing dependency build; PR core, bundle, SQL catalog, and affected test sources were rebuilt from this branch.table_test(289),json_serde_test(171),v4_table_metadata_test(25),v4_types_test(12),metadata_table_test(29),catalog_test(14), andschema_test(578): passed. Regressions cover current/historical identifier preservation, nullable constraints, real-version snapshot parsing, stale sequence precedence, shared location validation, and explicit metadata paths. One existing JSON test remains disabled.table_update_test: 893 passed and 15 existing version-specific cases skipped. Both cleanup levels warn and retain manifest lists, manifests, and data files if committed metadata introduces a v4 root. Schema/spec pruning through roots fails explicitly before commit; plainkNoneexpiration remains available.cpp20_compatibility_test, pre-commit on the full PR diff, andgit diff --check: passed. The SQL catalog static library compiled with database connectors disabled.Total for the affected suites: 2,011 unit tests passed, 15 skipped, plus the C++20 public-header compatibility target.