feat(serde): support standalone FileScanTask JSON in core - #939
Open
kamcheungting-db wants to merge 9 commits into
Open
kamcheungting-db wants to merge 9 commits into
kamcheungting-db wants to merge 9 commits into
Conversation
kamcheungting-db
force-pushed
the
filescan-task-serde
branch
from
September 30, 2026 07:23
5e4cca7 to
629b204
Compare
kamcheungting-db
force-pushed
the
filescan-task-serde
branch
from
September 30, 2026 08:09
629b204 to
01447df
Compare
This was referenced Sep 30, 2026
Contributor
Author
|
I split the original change into a reviewable stack:
For the incremental diff that belongs only to this PR, use: The key distinction in this layer is:
The PR description now includes a complete JSON example and the stack order. |
kamcheungting-db
force-pushed
the
filescan-task-serde
branch
from
September 30, 2026 10:04
01447df to
004215a
Compare
kamcheungting-db
force-pushed
the
filescan-task-serde
branch
from
September 30, 2026 10:55
004215a to
0010d0e
Compare
kamcheungting-db
force-pushed
the
filescan-task-serde
branch
from
September 30, 2026 20:33
0010d0e to
dff1adb
Compare
This branch has not been deployed
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
Add standalone core JSON serialization and deserialization for
FileScanTask.Unlike REST scan responses, core task JSON is self-contained: it embeds the schema, partition spec, data file, delete files, range, and residual filter.
Example
{ "task-type": "file-scan-task", "schema": {"type": "struct", "schema-id": 0, "fields": []}, "spec": {"spec-id": 0, "fields": []}, "data-file": { "spec-id": 0, "content": "data", "file-path": "/data.parquet", "file-format": "parquet", "partition": [], "record-count": 10, "file-size-in-bytes": 100 }, "start": 0, "length": 100, "delete-files": [], "residual-filter": true }Core versus REST delete files
Core JSON inlines delete files:
REST may instead refer to a sibling response array:
Those references only make sense while parsing the complete REST response, so core serde rejects them and leaves them in the REST-specific path.
Split handling
C++ does not currently support split
FileScanTasks. This PR accepts only the whole file:For a 100-byte file, values such as
"start": 10or"length": 90are rejected instead of silently becoming a whole-file task. The REST parser now performs the same check.The implementation also validates data/delete file roles, null delete entries, task type, and required fields. A missing residual filter defaults to
alwaysTrue.Stack
This is 3 of 4 and depends on #975:
DataFileserde into core (refactor(serde): move DataFile JSON handling from REST to core #974)DataFileJSON (fix(serde): make DataFile JSON compatible with Java Iceberg #975)FileScanTaskJSON serdeEach PR targets
main; later PRs contain the commits from earlier PRs.Testing
FileScanTasktests passed.