Skip to content

feat(scan): make FileScanTask serializable - #3091

Draft
blackmwk wants to merge 5 commits into
apache:mainfrom
blackmwk:ir-3089
Draft

feat(scan): make FileScanTask serializable#3091
blackmwk wants to merge 5 commits into
apache:mainfrom
blackmwk:ir-3089

Conversation

@blackmwk

@blackmwk blackmwk commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

What changes are included in this PR?

  • Replace the placeholder serde failures on FileScanTask context fields with working serialization.
  • Add a private serde adapter for FileScanTask that serializes partition data through the existing RawLiteral implementation.
  • Use the task schema and partition spec as the type context required to reconstruct partition literals during deserialization.
  • Serialize partition specs, name mappings, and unified partition types through their existing serde implementations.
  • Expand round-trip coverage for a fully populated scan task, including partition data and all optional scan context fields.

The existing key_metadata trust boundary is unchanged: encrypted-file key metadata remains part of a serialized scan task as documented on the field.

Are these changes tested?

  • cargo test -p iceberg --lib (1,585 passed)
  • cargo clippy -p iceberg --lib --tests -- -D warnings
  • cargo fmt --all -- --check
  • git diff --check
  • make check-public-api

AI Disclosure

Codex was used to assist with implementation, regression-test scaffolding, review follow-up, and validation. I reviewed the resulting design and diff, and verified it with the tests and linters listed above. There are no known unresolved assumptions or uncertainties.

Replace the placeholder serde errors with a lossless representation for partition literals and use the existing serde implementations for the remaining scan context fields. Expand round-trip coverage to include a fully populated task and every primitive partition literal.

[apache#3089](apache#3089)
Comment thread crates/iceberg/src/scan/task.rs Outdated
Comment thread crates/iceberg/src/scan/task.rs Outdated
Move the self-describing serde representation into Literal so scan task partitions use the shared values-layer implementation. Cover primitive and nested literal round trips and remove the task-local helper requested in review.
Record the new Serialize and Deserialize implementations for Literal and Struct.
Comment thread crates/iceberg/src/spec/values/literal.rs Outdated
Serialize partition data through the existing RawLiteral implementation using the task schema and partition spec. Remove the direct Literal and Struct serde implementation and keep the public API unchanged.
Comment thread crates/iceberg/src/scan/task.rs Outdated
Comment thread crates/iceberg/src/scan/task.rs Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make FileScanTask serializable.

2 participants