Repository navigation
Conversation
HairstonE
commented
Dec 1, 2026
|
|
||
| #[tokio::test] | ||
| async fn version_pinning_without_version_errors_at_open() { | ||
| // InMemory reports no `version`, so Version pinning must fail cleanly |
Contributor
Author
There was a problem hiding this comment.
InMemory reports no version ids, so there is no end-to-end Version test. Version shares the ETag path except which field it copies.
HairstonE
commented
Dec 1, 2026
| pub output_partitioning: Option<Partitioning>, | ||
| /// Pin parquet, CSV, and JSON reads to the etag or version captured at planning | ||
| /// time. Other formats and custom `ParquetFileReaderFactory` implementations are unpinned. | ||
| pub object_version_type: Option<ObjectVersionType>, |
Contributor
Author
There was a problem hiding this comment.
AVRO, Arrow, and custom ParquetFileReaderFactory implementations are not pinned.
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.
Which issue does this PR close?
ListingTableshould support scanning against versioned object store files #18211.Rationale for this change
If a file is overwritten between planning and execution, the scan reads the new bytes through byte ranges computed from the old file. The reads fail or return wrong rows. The planning-time etag and version already sit in
PartitionedFile::object_meta.What changes are included in this PR?
An opt-in
object_version_type(ETagorVersion) onListingOptions. At open time, each file's store is wrapped so that every read carries the planning-time etag or version inGetOptions. The store then rejects an overwritten file with a precondition error instead of serving mismatched bytes. WithVersion, a versioned store serves the planning-time object instead. Pinned plans refuse proto serialization until thePartitionedFileproto carries the pinned fields.What is the testing strategy for this PR?
Integration tests in
object_version_pinning.rsrun across parquet, CSV, and JSON through a request-recording store. They assert that every read carries the pin, that a same-size overwrite fails only when pinned, and that a missing version id fails at open. Unit tests cover the off switch and the missing-metadata errors.Are there any user-facing changes?
New opt-in API on
ListingOptionsandFileScanConfigBuilder. Defaults are unchanged. The new public struct fields can break struct-literal construction downstream.