Repository navigation
Merge upstream/main: 137 commits (stateful transaction actions, per-prefix vended credentials, reader options, table cache) - #85
Merged
Conversation
* ci: increase merge queue status check timeout * ci: set merge queue status check timeout to 360 minutes
…#3455) Fixes RUSTSEC-2026-0346, RUSTSEC-2026-0347, RUSTSEC-2026-0348 and RUSTSEC-2026-0349, which fail the security audit check. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ache#3416) * fix(reader): rewrite NOT out of the read predicate before pruning The reader fans a FileScanTask's predicate to the row-group metrics evaluator and the page-index evaluator, both conservative (inclusive) filters that cannot soundly negate a NOT node. The row-group evaluator's naive `!inner` flips a MIGHT_MATCH bound to CANT_MATCH. For NOT(x > 5) over a row group spanning [0, 10] that prunes a group which does contain matching rows (silent data loss). The page-index evaluator rejects NOT outright, aborting the read. A FileScanTask built or deserialized outside TableScan carries an un-normalized predicate, so a raw NOT reaches both. Rewrite NOT out of the predicate once, where it is first bound in the read pipeline, so every consumer sees a NOT-free predicate. * PR feedback
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
ubuntu-latest jobs across the apache org are queuing for 50-80 minutes, while ubuntu-24.04 jobs on the same image start within minutes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
An engine that uses the crate for metadata but reads Parquet with a reader of its own cannot go through ArrowReader, and so far had to reimplement the deletion-vector-v1 decoding to apply deletion vectors. Expose the module, the way puffin already is, with the docs deny(missing_docs) then requires, an is_empty next to len, and the public API snapshot regenerated. Co-authored-by: Claude <noreply@anthropic.com>
… write (apache#2904) * init * cleanup * minimal tests * fix conflicts and cleanup * test(scan): cover each schema change after the last write Test the other schema changes that reach the current-schema branch of TableScanBuilder::build, each through a real read of the fixture's data files and with full assertions on what comes back: - a column dropped and added back under the same name reads as null, where it previously returned the old column's values - a renamed column reads under its new name - a dropped column is no longer selectable from the current state, but a scan pinned to the snapshot still reads it - a filter on an added column binds; is_null matches every row Merge the two current-state tests for an added column into one that reads the column, and assert the full error of the time-travel test. Document on TableScanBuilder::snapshot_id that pinning a snapshot also selects the schema it was written with, and rename PlanContext's snapshot_schema to scan_schema, since it now holds the current schema for a scan of the current state. * refactor(scan): keep PlanContext's snapshot_schema name, and document what it holds * ci: retrigger * test(scan): check snapshot and schema in unit tests, move data checks to integration tests Add TableTestFixture::new_with_column_added_after_last_write and slim the scan unit tests to assert the scan's snapshot and projected schema. The data checks for added, dropped, re-added and renamed columns move to read_schema_changed_after_last_write.rs, against tables provisioned by Spark. * test: remove integration tests for scans after a schema change End-to-end checks are tracked in apache/datafusion-iceberg#75 as sqllogictests.
…#3265) * feat(transaction): Introduce stateful TransactionAction trait Rework the TransactionAction trait per the stateful transaction RFC (milestone 1): each action declares an associated retry-persistent State type created via new_state(), commit() borrows the action immutably and its state mutably per attempt, and a consuming cleanup() plus CommitStatus define terminal-cleanup semantics (not yet invoked; wired in a later milestone). Transactions now store one entry per action, pairing immutable intent with exclusively-owned execution state behind an object-safe ErasedActionEntry adapter. Cloning a transaction creates a new execution of the action plan: actions are duplicated and paired with fresh state, so retry state is never shared between executions. All existing actions migrate with State = () and no-op cleanup. * chore: Regenerate public-api baseline for action Clone impls * better comments * address comments * address comments * Address comments, add stateless tx action for convenience * clean up * rebase * minor * minor * fix import * actually test states reset and carried * address comments * update comments * fix clippy * testing
…apache#3358) * fix(spec): format float and double partition values like iceberg-java * test(spec): move float to_human_string test to datum tests
…ings (apache#3408) apache#3286 added with_runtime to BoxedCatalogBuilder, but CatalogLoader, the one-line entry point, still had no way to set a runtime, so a catalog loaded through it always fell back to Runtime::current(). It had no way to set a storage or KMS client factory either, so it couldn't load a SQL catalog at all: SqlCatalog requires a storage factory. Add with_storage_factory, with_kms_client_factory and with_runtime to CatalogLoader, and apply them to the builder in load(). Raised in review of apache#3286.
…3102) * refactor(glue): derive catalog configuration from properties Use the shared property derive for Glue catalog settings while preserving warehouse validation and forwarding AWS and storage properties. Tracks [apache#3096](apache#3096). Generated-by: Codex * refactor(glue): simplify catalog builder and tests Derive Default for GlueCatalogBuilder, use the conventional tests module name, and remove the FileIO forwarding test requested in review. Generated-by: Codex
…rewrite manifests (apache#3253) * Let a snapshot operation report the files it removed The snapshot summary could only count what the caller asked to remove, so an operation that skips a path it never had, or is handed the same path twice, inflated deleted-data-files and deleted-records. SnapshotProduceOperation now reports the entries it actually marked Deleted, each with the schema and partition spec of the manifest that recorded it, and the summary counts those. Two changes follow from it. The manifests are produced before the summary, since the counts are only known once the operation has run, which means the added data files are cloned rather than taken. And the full-table truncate that drops the previous totals is gated on a new operation hook instead of on the operation being Overwrite: a partial overwrite keeps the totals, and with truncate off update_totals needs a saturating subtraction so removing more than the previous total does not underflow. * Keep manifest names unique across a commit The manifest name is built inline in new_manifest_writer from the metadata location, the commit uuid and a counter, so anything else that needs to write a manifest for the same commit has to reinvent it, and a name invented elsewhere is neither unique within the commit nor findable by orphan cleanup after a failed one. Pull the name out into new_manifest_path, and make the counter an AtomicU64 so it can be bumped behind a shared reference. * Write a manifest under the schema and spec it was written with new_manifest_writer hardcoded the table's current schema and default partition spec, so an operation that rewrites an existing manifest could not keep the schema and spec that manifest's entries were recorded under, and building a writer by hand instead means losing the encryption manager the method already branches on: on an encrypted table the manifest would go out in plaintext while its key metadata said otherwise. The schema and partition spec become arguments, and the added-files path passes the table's current ones. * test(transaction): cover partial overwrite and per-file spec in snapshot summary Co-authored-by: Marco Kroll <216147982+mkroll-db@users.noreply.github.com> * Drop the full-table truncation from the snapshot summary Java and PyIceberg derive totals from the files an operation marks deleted, with no truncation path. * Omit a summary total that would go negative, as Java does * Name the removed-file fields and take the manifest spec by ref * Take the added files again instead of cloning them for the summary * Assert an operation reports exactly the files it marked deleted * Say in the removed_data_files doc what it must match * Summarize deleted files from the producer's list, as pyiceberg does Drops the removed_data_files hook and the manifest-first reorder, and truncation defaults back to every overwrite. * Check that deletion summaries match manifest entries * Format dropped-source integer partition values --------- Co-authored-by: Marco Kroll <216147982+mkroll-db@users.noreply.github.com>
…3459) Classic branch protection can only be bypassed by admins. Defining the required checks in the Merge Queue ruleset lets that ruleset's bypass actors skip them. The checks, their contexts and the non-strict policy are unchanged, and approvals and linear history stay in classic protection. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ache#3465) * enforce open pull request limit and add to CONTRIBUTING.md * trim comment length * Update CONTRIBUTING.md Co-authored-by: Shawn Chang <yxchang@amazon.com> --------- Co-authored-by: Shawn Chang <yxchang@amazon.com>
* chore: add a test capturing the change * fix: add uuid support to arrow_schema_to_schema * chore: add uuid to the large arrow_schema_to_schema_auto_assign_ids test * chore: update the public api * feat: add a type check on the uuid conversion * chore: add a test for schema_to_arrow_schema for uuid * feat: add UUID support for schema_to_arrow_schema * docs: add uuid extension to visit_field documentation * refactor: remove duplicate UUID extension import from test * chore: add tests for fixed size binary of wrong size * feat: enable parquet writing uuid with uuid extension * chore: fmt Cargo.toml
…pache#3458) Give apache/iceberg-public a pull_request-only bypass on the Merge Queue ruleset so an approved urgent fix can skip the queue and required checks. Direct pushes stay blocked, and the approval in classic protection still applies. The team holds committers who opted in via Boxer; the regular committers team is secret and cannot be a bypass actor. apache/root can always bypass. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Record the full map received by the KMS factory and check initialization error propagation. Label missing and empty warehouse cases and document the crate-private Glue properties. Follow-up to apache#3102. Generated-by: Codex
feat: recognize geometry and geography types Co-authored-by: Danny C Jones <4976211+dannycjones@users.noreply.github.com> Co-authored-by: Shawn Chang <42792772+CTTY@users.noreply.github.com>
* Fix committing to a read-only table Prevent committing to a read-only table. This affects for all tables obtained via `StaticTable::into_table`. * Update CHANGELOG.md Co-authored-by: Andrei Tserakhau <tserakhau@double.cloud> * Update `commit` doc string Co-authored-by: Andrei Tserakhau <tserakhau@double.cloud> * Improve readonly test setup --------- Co-authored-by: Marco Kroll <marco.h.kroll+iceberg@gmail.com> Co-authored-by: Andrei Tserakhau <tserakhau@double.cloud>
…rks (apache#3481) * ci: move branch protection into the Merge Queue ruleset Classic branch protection can only be bypassed by admins, and while it exists GitHub blocks direct merges for the ruleset's bypass actors even when every requirement is met. Move the approval, linear-history, deletion and force-push rules into the Merge Queue ruleset and disable classic protection, as apache/seatunnel does, so iceberg-public members can use the breakglass. Requirements are otherwise unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * ci: keep the approval rule out of the bypassable ruleset Put deletion, force-push, linear-history and approval rules in a separate Branch Protection ruleset that only apache/root can bypass, so the iceberg-public breakglass skips only the merge queue and required checks. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * ci: use infra's default branch protection ruleset template Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * ci: keep dismiss_stale_reviews explicit Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… in snapshot summaries (apache#3363) * feat(transaction): record the Rust writer in snapshot summaries A commit from iceberg-rust was indistinguishable from any other client that omits writer identity. Stamp engine-name, engine-version, and iceberg-version on every snapshot so mixed-writer tables can attribute the commit. Generated-by: Cursor Grok 4.7 * Remove the writer-identity comments. Generated-by: Cursor Grok 4.7 * Keep a caller-supplied engine name and version. iceberg-version still identifies this library. engine-name and engine-version are filled only when the caller did not set them, so an embedding engine can record itself through snapshot properties. Generated-by: Cursor Grok 4.7 * Keep the writer-identity tests on snapshot properties. A data file and an unrelated property do not affect those keys. Also list the new summary constants alphabetically. Generated-by: Cursor Grok 4.7 * Write only iceberg-version into snapshot summaries. engine-name and engine-version name the embedding engine, which this library does not know. Callers can still set them. iceberg-version remains the library identity, matching Java and Go. Generated-by: Cursor Grok 4.7 * Drop the caller engine-identity snapshot test. Those keys are ordinary snapshot properties now, so preserving a caller value is already covered by the existing property test. Generated-by: Cursor Grok 4.7 * Stop asserting that engine identity keys are absent. The snapshot summary no longer writes those keys, so the test only checks iceberg-version. Generated-by: Cursor Grok 4.7 * Update crates/iceberg/src/transaction/append.rs Co-authored-by: Matt Butrovich <mbutrovich@users.noreply.github.com> * Move the iceberg-version summary key next to the other keys. The transaction path still writes the value. The property name now lives with the rest of the summary keys the library defines. Generated-by: Cursor Grok 4.7 * Set iceberg-version from the snapshot summary module. The key stays private next to the other summary keys, and the commit path calls set_iceberg_version after the totals are computed. Generated-by: Cursor Grok 4.7 * Restore the blank line before the SnapshotProduceOperation docs. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Matt Butrovich <mbutrovich@users.noreply.github.com> Co-authored-by: Kevin Liu <kevin.jq.liu@gmail.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add Windows ARM64 build Co-authored-by: Kevin Liu <kevinjqliu@users.noreply.github.com>
…pache#3406) * feat(table): add Table::with_runtime that keeps the manifest cache A table gets its runtime only when it is built, and rebuilding it through Table::builder() starts with an empty ObjectCache. An engine that caches a Table and wants its scans to run on the runtime executing the query has no way to switch runtimes without losing the cached manifests and manifest lists. * docs(table): tighten Table::with_runtime docs Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Kevin Liu <kevin.jq.liu@gmail.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Removing a queued PR is required before a direct merge. Document only the CLI, since the web UI shows the bypass checkbox only while a required check is pending or failing. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* fix(reader): prune data columns for empty projections An empty projection (e.g. `COUNT(*)`) was excluded from the metadata-only path, so every column of every data file was read. Treat it as metadata-only so the RowNumber virtual column supplies the row count with zero data columns read. * test(reader): cover empty projection with deletes and predicates Rename metadata_only_projection to no_data_columns_projected, since it now also covers the empty projection. Assert the output shape in the bytes-read test, and add empty-projection row-count tests for a positional delete and a predicate on a non-projected column.
* feat(rest): support freshness-aware table loading * fix(rest): reject out-of-range table cache expiry * fix(rest): address review feedback on table cache * fix(rest): invalidate before sending changes and narrow credential check * test(rest): pin table cache invalidation order and credential keys
…trary one (apache#3413) * fix(spec): reuse the highest matching partition field id, not an arbitrary one `reuse_partition_field_ids` collects (source_id, transform) -> field_id into a HashMap with no merge function, so when several specs give one pair different field ids the last one visited wins. `partition_specs` is itself a HashMap, so the winner changes from run to run and the same input metadata yields different output. Keep the highest id of each pair, as Iceberg Java does: Collectors.toMap( field -> Pair.of(field.sourceId(), field.transform().toString()), PartitionField::fieldId, Math::max) Divergent ids for one pair cannot be produced by this crate, since the reuse rule keeps them converged, but they can be read from tables written before the rule existed or by writers that do not apply it. * comments * Deterministic test * clippy
…che#3496) * fix: update rustls-webpki and webpki-roots for emSign advisories Bump rustls-webpki to 0.103.16 and webpki-roots / webpki-root-certs to 1.0.10 to address RUSTSEC-2026-0382, RUSTSEC-2026-0381 and RUSTSEC-2026-0383. Ignore RUSTSEC-2026-0381 for the webpki-roots 0.26.11 shim pulled in by sqlx-core 0.8.6, which re-exports the fixed 1.0.10. Co-authored-by: Isaac <no-reply@databricks.com> * fix: drop unused sqlx TLS dev feature instead of ignoring RUSTSEC-2026-0381 The SQL catalog tests only use SQLite, so the tls-rustls feature on the sqlx dev-dependency is unused. Removing it drops webpki-roots from the lockfile, so the audit ignore is no longer needed. Co-authored-by: Isaac <no-reply@databricks.com> --------- Co-authored-by: Dhruv Arya <aryadhruv@gmail.com> Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: kurtoskalac <359376012+kurtoskalac@users.noreply.github.com>
…che#3540) * fix(reader): keep matching rows when filtering a promoted column Predicates are bound to the table schema, but the row filter evaluated them on batches in the file's physical types. For a file written before an int -> long, float -> double, or decimal precision promotion, try_cast_literal cast the literal down to the file type, so an out-of-range literal became null and dropped every row, and a double literal was rounded to f32. Convert the filter columns to the table schema with a RecordBatchTransformer, as the reader does for its output, and make try_cast_literal fail instead of returning null. Page-index pruning is left to apache#3507 and apache#3521. Part of apache#3122. * test(reader): cover files without field ids and date promotion; name the strict cast Reuse read_once in assert_promoted_reads, read each file with and without a field id, and add a date -> timestamp case. Explain why try_cast_literal sets safe: false. * perf(reader): build the row filter transformer from the filter fields only The transformer converts its whole schema to Arrow on each file's first batch. Give it a schema of the top-level filter fields so that setup no longer grows with the table's width. * fix(reader): build the row filter schema from each leaf's top-level field A filter leaf nested in a struct has no top-level field of its own, so the filter schema missed it and the transformer failed with `field not found` once nested predicates reach the row filter (apache#2906). Take each leaf's top-level field, prune it to the filter leaves, and pass the top-level ids in leaf order. * fix(reader): reject a filter leaf that is not in the scan schema filter_schema skipped a leaf without an accessor in the scan schema, so the converted filter batch had fewer columns than the predicate's column positions, and the predicate panicked with an index out of bounds. Only a task whose predicate was bound to another schema gets there. Fail with DataInvalid instead, as validate_equality_ids does for equality deletes and the row group evaluator does with default options. * fix(spec): return an empty struct from prune_columns for an empty selection PruneColumn::schema unwrapped the visited struct, so selecting nothing panicked before prune_columns reached its fallback to an empty struct. Return the value as is, so the fallback applies. * refactor(reader): simplify the row filter schema and its tests - filter_schema returns only the schema. The transformer's root ids are its top-level fields, and the empty-selection guard is gone now that prune_columns handles it. - Use invalid_data! for the unknown-leaf error, and drop the unused schema id. - try_cast_literal's doc no longer cites Binary and LargeBinary, which now map to one Arrow type. - test_predicate_converter_rejects_lossy_literal_cast reuses apply_predicate_to_batch, which now takes the file's message type and returns the predicate's result. - test_predicate_on_promoted_column keeps one case per promotion. The dropped cases passed or failed together with the kept ones under every mutation of the row filter.
…apache#2651) * feat(rest): use vended storage credentials from LoadTable response * feat(rest): per-prefix vended credentials with opt-in delegation header * fix(io): bound delete_stream memory by flushing per-prefix batches * fix(rest): route vended credentials by prefix and keep them in object cache * test(rest): cover vended credentials reaching FileIO and prefix routing * docs(io): note that prefix matching is raw-string, as in Java * fix(rest): keep vended credentials on register_table * test(io): prefixed credentials survive FileIO serialization * docs(rest): note that only Transaction can reach update_table * fix(io): keep cached storages out of FileIO's Debug * fix(transaction): act with the refreshed FileIO and reload on any location change * fix(transaction): keep the table's initialized storage when a reload changes nothing * fix(transaction): return the actions' FileIO and never replay a durable commit * fix(rest): preserve context in update_table * fix(io): delete through nested prefix storages in delete_prefix * fix(rest): replace inherited credential sets with vended ones * fix(io): keep nested prefix deletes within their own prefix * fix(io): reject nested raw prefixes and route delete_prefix by directory * docs: simplify vended credential comments * refactor: drop redundant location check and overlapping tests * test(transaction): implement test actions as StatelessAction * refactor(io): carry vended credentials in StorageConfig for storage factories to apply * refactor(io): build StorageConfig with TypedBuilder and reuse StorageCredential in REST * refactor(io): pass a built StorageConfig through FileIOBuilder::with_config * refactor(storage/opendal): hold OpenDalStorage in PrefixedStorage and validate credential prefixes * test(storage/opendal): parameterize PrefixedStorage tests with rstest * refactor(io): keep the last storage credential per prefix in StorageConfig * fix(storage/opendal): skip credentials with unsupported schemes when resolving A credential whose prefix has an unknown scheme was passed to every backend, so an invalid config in it failed paths it can never match. Also hold a StorageConfig instead of its props and credentials, and correct the DELETE_BATCH_SIZE comment: 1000 is Java's maximum, not its default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
… is missing (apache#3635) * fix(spec): read the manifest schema id from the schema when schema-id is missing * test: build one v2 header in the manifest metadata tests --------- Co-authored-by: Burak Ozakinci <burakoz@amazon.com>
…he#3701) * fix(transaction): keep only the first requirement on each value Each action derives its requirements from the transaction-local table, so a second action asserts state that an earlier action in the same transaction wrote. Catalogs check requirements against the transaction base, so two fast appends in one transaction failed with "Requirement failed: Branch or tag `main` not found". The first requirement on each value is the one derived from the base; later ones on the same value are now dropped. Refs are matched by name. Prior art: apache#3075, which took the same approach alongside other changes. * docs(transaction): shorten merge_requirements comment * test(transaction): commit an added column and a sort order on it in one transaction
* fix(encryption): check the AGS1 stream header on read AesGcmFileRead skipped the 8-byte header, so a stream with the wrong magic or an unsupported plaintext block size was decrypted as if it were valid AGS1. The header is not authenticated, so it is now read and checked along with the first block, matching Java's AesGcmInputStream. * fix(encryption): take the AGS1 header as a fixed-size array check_stream_header now takes &[u8; 8], split off with split_first_chunk, so it cannot panic on a short slice. The header test also covers the empty stream. * fix(encryption): check the AGS1 header on the first read Reads that started past block 0 skipped the header check. The first read now always checks it, fetching the header separately when block 0 is not needed, and later reads skip it. * test(encryption): use rstest cases for the AGS1 header test Drops the test that pinned which ranges the reader fetches.
* fix(scan): promote date column bounds to timestamp Date columns promoted to timestamp or timestamp_ns keep day-count lower/upper bounds in older manifests. Convert those bounds to midnight of each day (including 4-byte date payloads under a timestamp schema) so bound pruning keeps working across the promotion. Dates that overflow the target range return DataInvalid. Partition date→timestamp is not promoted: the spec rules that out for identity transforms. Closes apache#3503 * refactor: move date-to-timestamp conversion into temporal.rs Address review: the day-count conversion helpers now live next to the other date conversions in spec/values/temporal.rs, PrimitiveLiteral::promote_to documents that it does not cover date -> timestamp (use Datum::promote_to), and the column-stats bound promotion in scan/task.rs handles the new Result return of Datum::promote_to.
aes 0.8 and polyval 0.6 only use the ARMv8 AES and PMULL instructions when built with --cfg aes_armv8 and --cfg polyval_armv8, which a library cannot set for its users, so encryption fell back to software on aarch64. aes-gcm 0.11 pulls in aes 0.9 and polyval 0.7, which detect the instructions at runtime.
…3632) * fix(arrow): preserve INT96 timestamptz values in projections * test(arrow): remove unreachable leaf-count mismatch case * fix(arrow): propagate INT96 coercion errors and simplify tests * test(arrow): cover nested INT96 timestamps with name mapping * test(arrow): cover nested INT96 timestamps with name mapping * fix(arrow): preserve timestamp projections and traverse list views * fix(arrow): accept list views outside INT96 coercion Schema conversion reads ListView and LargeListView as Iceberg lists, and metadata stripping keeps the view type. The unselected list-view read also covers files resolved by name mapping, and the nanosecond projection arms note that they exist for migrated files rather than as a spec type promotion. --------- Co-authored-by: Hung <hung@Hungs-Mac-mini.local>
* fix(reader): read list views as lists parquet-rs reads a Parquet LIST as ListView or LargeListView when the file's embedded Arrow schema says so. arrow-schema 60.1.0 made Fields::filter_leaves descend into list views (apache/arrow-rs@a8306d6), but Iceberg still cannot read them. arrow_schema_to_schema has no list view arm, and RecordBatchTransformer cannot promote a list view to List. Add ListView and LargeListView arms to the FixedSizeList hint rewrite from apache#3629, and rename it to coerce_list_layouts. PresenceWalk no longer sees a list view, so its list view arm folds into the List arm. Closes apache#3393 * test(reader): read list views through a name mapping and fallback IDs - test_read_list_view_columns also writes the file without field IDs, as a LargeListView, and reads it through a name mapping and through fallback IDs. - test_coerce_list_layouts gives every field an ID and nests a list view under a large list view. - The presence walk case also counts leaves through a LargeListView. - apply_name_mapping_to_field asserts in debug builds that no list view reaches it, and the argument doc states the precondition. * Update crates/iceberg/src/arrow/reader/projection.rs Co-authored-by: Matt Butrovich <mbutrovich@users.noreply.github.com> * docs(reader): give only the transformer reason for the list layout rewrite arrow_schema_to_schema converts list views once apache#3632 lands, so name only the reason that holds either way: RecordBatchTransformer converts neither a fixed-size list nor a list view. --------- Co-authored-by: Matt Butrovich <mbutrovich@users.noreply.github.com>
…0261202 Brings in 137 upstream commits since the last sync (1270e32), while preserving this fork's own features (OverwriteAction with assert_requirements, incremental scan, credential-refreshing storage, vended credentials on load/create, custom auth, Azdls anonymous access, _file/_pos metadata columns, Binary -> Fixed promotion). Conflict resolution notes: - transaction/: upstream replaced the SnapshotProducer (snapshot.rs) with stateful TransactionActions and helper functions (snapshot/mod.rs, snapshot/simple.rs; apache#3265, apache#3474, apache#3253). OverwriteAction is ported onto them: it keeps the snapshot id and commit UUID across commit retries and writes fresh manifest and manifest list names per attempt, like FastAppendAction. A rewritten manifest now drops tombstones of earlier snapshots instead of carrying them forward (as Java's manifest filter does), so the summary and the manifest's deleted-files count match what the commit removed, as upstream's write_snapshot_commit asserts. The incremental scan reads each snapshot's own manifests, so it loses nothing. - transaction/mod.rs: upstream keeps only the first requirement per value (apache#3701). Requirements supplied through assert_requirements are kept apart and take precedence over derived ones, whichever action derived them, so a pinned base is never displaced by an earlier action's RefSnapshotIdMatch. Regression test added. - catalog/rest: upstream added per-prefix vended credentials (apache#2651) and a table cache. load_table_internal/create_table_internal follow upstream's bodies and keep the fork's per-call delegation header, the best-match merge into props (which the refreshable storage rebuilds from), and the table identity on the FileIO. A load that requests vended credentials bypasses the table cache, since a 304 on a cached credential-less entry would return a table without credentials. Regression test added. - io: the fork's StorageCredential duplicated upstream's; unified on upstream's type (validated prefix, accessors, redacted Debug). StorageCredentialsLoader now returns it. FileIOBuilder keeps both the fork's with_location/with_table_ident and upstream's with_config. - arrow/reader/pipeline.rs: kept the fork's split helpers (shared with the incremental reader) and ported upstream's process() changes into them: skip empty files, spawn the open on the IO runtime, a no-data-column projection including COUNT(*), NOT normalization, the residual for missing fields, the row filter's schema, the spawned bloom-filter pass, list-layout and INT96 coercion. The fork's multi-file reader now runs its coordination loop in the returned stream, so a dropped scan stops opening files (upstream's open_progress test); decoding still runs on a task per file. - arrow/reader/mod.rs, scan/incremental: ArrowReader settings moved into ArrowReaderOptions upstream; the incremental reader reads them from there and keeps its own to_arrow() signatures. - scan/context.rs: upstream skips deleted manifest entries early (apache#3516); the incremental scan needs them, so the skip is per context (include_deleted_entries). - storage/opendal, delete_vector.rs, scan/mod.rs, projection.rs: both sides' additions kept. Verified: cargo test -p iceberg (2391 + 96 doc tests), iceberg-catalog-rest --lib (130), iceberg-storage-refreshable (10 + 1 doc), iceberg-storage-opendal --lib (96); cargo clippy --workspace --all-targets --all-features -D warnings and cargo fmt --check clean; public-api.txt regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ader coordination Review follow-ups for the upstream merge: - Incremental scan: the from-snapshot data entries were read straight from the manifest cache, so after upstream's partition promotion (apache#3483, apache#3516) their partition values were no longer promoted while the delete files in the DeleteFileIndex were. An equality delete written before an int -> long promotion of an identity-partition source then no longer matched its data file. The from-snapshot entries are now promoted to the scan schema's partition types the same way. - Incremental equality-delete tasks for from-snapshot files carry the file's partition and spec, so upstream's residual for missing fields can use identity-partition constants, as the append path already does. - Readers: the coordination loop of the table-scan reader is factored into coordinated_record_batch_stream and used by the incremental reader too. A dropped incremental scan now stops reading files (upstream apache#3276 behaviour), and a per-file task that fails (e.g. panics) now fails the scan instead of silently ending that file's batches, on both paths. - The incremental reader skips files with record_count == Some(0), as upstream's table-scan reader does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…endAction Review follow-ups for the upstream merge: - Pinned requirements (assert_requirements) were de-duplicated among themselves, so two overwrites pinned to different bases of main (or two assert_requirements calls) sent only the first pin and the commit could succeed although the second was false. Every pinned requirement is sent now; only derived requirements on a pinned value are dropped. - delete_data_files rejects non-data files, as add_data_files does: deleting a delete file tripped upstream's write_snapshot_commit debug_assert, and in release builds produced a deleted delete-file entry the incremental scan rejects. - add_data_files ignores a path already added, as upstream's FastAppendAction::add_data_files now does. - Corrected a test comment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upstream now vends storage credentials per prefix (apache#2651): the REST catalog passes them to the FileIO as StorageConfig::storage_credentials, and the OpenDAL factories route each location to the credential for its prefix. The fork additionally merged the credential best matching the metadata location into the FileIO props, because RefreshableStorageFactory rebuilt its storage from the props alone. That duplicated upstream's mechanism in catalog.rs and, combined with it, let one prefix's credential leak into the storages of other prefixes (e.g. a table with data under another bucket), discarded the per-prefix credentials on the refreshable path, and resolved duplicate prefixes differently (first vs last). - RefreshableStorageFactory keeps the catalog's per-prefix credentials and builds its inner storage from the props plus those credentials. A refresh replaces the credential for the loader's prefix and keeps the others. - catalog.rs drops the fork's best-match merge. create_table and load_table are upstream's code again (plus the table identity the refreshable storage needs); the fork's load_table_internal and create_table_internal copies are gone. - load_table_with_credentials and create_table_with_credentials call them with a fresh session whose `header.X-Iceberg-Access-Delegation` property RestCatalogClient::query_catalog applies to its requests, the same convention as the catalog's own `header.` properties. A fresh session never hits the table cache, which only holds loads that vended nothing. catalog.rs now removes 6 upstream lines instead of 217. Tests: per-prefix credentials reach the inner factory and a refresh replaces only its prefix; create_table_with_credentials sends the delegation header and create_table does not; the cache-bypass test checks that credentials stay out of the base props. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upstream made the delete_vector module public (apache#3461) with a private field and accessors. The fork's incremental scan only consumed the field, so it now does that through a crate-private into_treemap() instead of a public field, and the public API matches upstream again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 tasks done
Upstream's CI now fails on rustdoc warnings (apache#3389, make check-doc), and RefreshableStorage's public docs linked the private RefreshableReader. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of the tests added for the upstream merge, keeping only what is fork-specific: - test_from_snapshot_entries_have_promoted_partitions: the incremental scan's from-snapshot entries get upstream's partition promotion (fails with Int(7) instead of Long(7) without the fix). - coordinated_record_batch_stream, the fork's reader coordination shared by the table-scan and incremental readers: batches flow and the stream ends with the loop, a failed loop fails the stream, dropping the stream drops the loop. - test_load_table_with_credentials_bypasses_table_cache is trimmed to the fork's part (a credential load reaches the catalog with the delegation header despite a cached plain load); credential routing is covered by upstream's test_load_table_passes_vended_credentials_to_file_io. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gbrgr
added a commit
to RelationalAI/RustyIceberg.jl
that referenced
this pull request
Dec 2, 2026
The previous pin (9dabf9c0) predates two commits on #85 that only touch tests and a doc comment, so the library code is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gbrgr
added a commit
to RelationalAI/RustyIceberg.jl
that referenced
this pull request
Dec 2, 2026
- assert_requirements' example pins AssertTableUuid together with AssertRefSnapshotId: a base of "no snapshot" also holds for a table dropped and re-created under the same name, and the action's own UUID requirement comes from the table the transaction was built from. A new test covers it (and that the snapshot pin alone does not). - Docs: supplied requirements are checked only by the catalog, and every one is sent, so contradictory requirements fail the commit (as RelationalAI/iceberg-rust#85 makes it). - Version: Project.toml 0.9.7 and iceberg_rust_ffi 0.9.8, after #119's 0.9.6 / 0.9.7. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 tasks done
charnik
approved these changes
Dec 2, 2026
gbrgr
added a commit
to RelationalAI/RustyIceberg.jl
that referenced
this pull request
Dec 2, 2026
fbc5adc9 is #85's merge commit on main; its tree is identical to the previously pinned PR head (b1583498). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gbrgr
added a commit
to RelationalAI/RustyIceberg.jl
that referenced
this pull request
Dec 2, 2026
- assert_requirements' example pins AssertTableUuid together with AssertRefSnapshotId: a base of "no snapshot" also holds for a table dropped and re-created under the same name, and the action's own UUID requirement comes from the table the transaction was built from. A new test covers it (and that the snapshot pin alone does not). - Docs: supplied requirements are checked only by the catalog, and every one is sent, so contradictory requirements fail the commit (as RelationalAI/iceberg-rust#85 makes it). - Version: Project.toml 0.9.7 and iceberg_rust_ffi 0.9.8, after #119's 0.9.6 / 0.9.7. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Syncs this fork with
upstream/main(137 commits since the last sync at1270e329b), preserving this fork's own features:OverwriteActionwithassert_requirements, incremental scan, credential-refreshing storage, vended credentials on load/create, custom auth, Azdls anonymous access,_file/_posmetadata columns, Binary → Fixed promotion.This is the base for the pinned-commit work (RAI-56511): the next RustyIceberg.jl bump picks up both this sync and
assert_requirements(#83), which the current RustyIceberg pin predates.Conflict resolution notes
transaction/: upstream replaced theSnapshotProducer(snapshot.rs) with statefulTransactionActions and helper functions (snapshot/mod.rs,snapshot/simple.rs; feat(transaction): Introduce stateful TransactionAction trait apache/iceberg-rust#3265, feat(transaction): Add simple snapshot producer, and wire fast append apache/iceberg-rust#3474, feat(transaction): let a snapshot operation report removed files and rewrite manifests apache/iceberg-rust#3253).OverwriteActionis ported onto them. It keeps the snapshot id and commit UUID across commit retries, and writes fresh manifest and manifest-list names per attempt, likeFastAppendAction.write_snapshot_commitasserts. The incremental scan reads each snapshot's own manifests and filters entries by snapshot id, so it loses nothing; before, it could see a carried-over tombstone twice.test_second_overwrite_does_not_resurrect_deleted_filenow asserts the invariant ("A is never live again", plus the summary count) instead of the old mechanism.transaction/mod.rs: upstream keeps only the first requirement per value (fix(transaction): keep only the first requirement on each value apache/iceberg-rust#3701). Requirements fromassert_requirementsare kept apart and take precedence over derived ones, whichever action derived them, so a pinned base is never displaced by an earlier action'sRefSnapshotIdMatch. New test:test_assert_requirements_takes_precedence_over_earlier_action(fast_appendfollowed by a pinnedoverwriteis rejected by the catalog).catalog/rest: upstream added per-prefix vended credentials (feat(rest): support vended storage credentials with per-prefix FileIO apache/iceberg-rust#2651) and a table cache with ETags.load_table_internalandcreate_table_internalfollow upstream's bodies and keep the fork's per-call delegation header, the best-match merge into props (which the refreshable storage rebuilds from), and the table ident on theFileIO.304on a cached, credential-less entry would return a table without credentials. New test:test_load_table_with_credentials_bypasses_table_cache.io: the fork'sStorageCredentialduplicated upstream's new one. I unified on upstream's type (validated non-empty prefix, accessors, redactedDebug), andStorageCredentialsLoadernow returns it. Downstream: RustyIceberg.jl'sRestCredentialsLoadermust usec.prefix()instead ofc.prefix(2 lines).FileIOBuilderkeeps the fork'swith_location/with_table_identalongside upstream'swith_config.arrow/reader/pipeline.rs: I kept the fork's split helpers, which the incremental reader shares, and ported upstream's 11process()hunks into them:COUNT(*);residual_for_missing_fields, and the row filter's schema argument;Upstream's new
open_progresstest caught a real gap: the fork's multi-file reader kept reading every remaining file after the scan was dropped. Its coordination loop now runs in the returned stream, so a dropped scan aborts in-flight opens at once; decoding still runs on a task per file.arrow/reader/mod.rs,scan/incremental: upstream movedArrowReader's settings intoArrowReaderOptions, andTableScan::to_arrownow takes them. The incremental reader reads them from there and keeps its ownto_arrow()/to_unzipped_arrow()signatures.ParquetReadOptions::with_preload_page_indexispub(crate)instead ofpub(super)for it.scan/context.rs: upstream skips deleted manifest entries early (perf(scan): skip deleted entries before partition promotion apache/iceberg-rust#3516), but the incremental scan needs them to report deleted files. The skip is now per context (include_deleted_entries: false for table scans, true for incremental).storage/opendal,delete_vector.rs,scan/mod.rs,projection.rs: both sides' additions kept (Azdlsallow_anonymousin upstream's new factory shape,DeleteVector: Clone,with_file_column/with_pos_columnnext towith_column_stats). The fork's_postests movewith_row_selection_enabledto the reader options.Review follow-ups (commits after the merge)
Three independent reviews (transactions; REST catalog and IO; reader and scans) found no blocking defects. These commits fix what they found. Where upstream now has its own version of a fork feature, the fork moves onto upstream's version, to keep later merges small.
Converge vended credentials on upstream's per-prefix storage credentials:storage_credentials. Combined with upstream's routing, it caused three defects:RefreshableStorageFactorynow keeps the catalog's per-prefix credentials and replaces only the refreshed prefix.catalog.rsis upstream's code again:create_tableandload_tableare restored verbatim, plus the table ident; the fork's_internalcopies are gone.*_with_credentialscall them with a fresh session whoseheader.X-Iceberg-Access-Delegationproperty the client applies to its requests.catalog.rsnow removes 6 upstream lines instead of 217.Send every pinned requirement, and align OverwriteAction with FastAppendAction:delete_data_filesrejects non-data files (this tripped upstream's debug assertion).add_data_filesde-duplicates paths, as upstream'sFastAppendActiondoes.Fix incremental-scan regressions from the upstream merge and share reader coordination:Keep DeleteVector's field private, as upstream does: upstream made the module public (feat(delete-vector): make the delete_vector module public apache/iceberg-rust#3461) with a private field. The fork's incremental scan uses a crate-privateinto_treemap(), so the public API matches upstream.Left as is:
OverwriteFilesdefault, and RAI's engine pins the base, so a moved table fails the commit.update_table's FileIO has no credentials (upstream has the same TODO).Downstream changes for the RustyIceberg.jl bump
catalog.rsRestCredentialsLoader: usec.prefix()instead ofc.prefix(2 lines). The loader still returns the credential matching the location; refresh now replaces that prefix's credential.nested_pipeline.rsbuild_reader: passArrowReaderOptions::builder().with_data_file_concurrency_limit(1).with_batch_size(batch_size).build()throughwith_options(the per-setting setters were removed upstream).full.rs: dropTableScanBuilder::with_batch_size(removed upstream; the reader already gets the batch size). The incremental scan builder keepswith_batch_size.Test plan
cargo test -p iceberg --all-features: 2394 passed, 96 doc tests passedcargo test -p iceberg-catalog-rest --all-features --lib: 131 passedcargo test -p iceberg-storage-refreshable --all-features: 11 + 1 doc passedcargo test -p iceberg-storage-opendal --all-features --lib: 96 passed (GCS/HDFS/S3 integration tests need their services and were not run)cargo clippy --workspace --all-targets --all-features -- -D warningsandcargo fmt --checkcleanmake generate-public-api; versus upstream the snapshots only add the fork's API, plusAzdlsConfig::builder's type, which gains a field🤖 Generated with Claude Code