Skip to content

REST: Support data sequence numbers in scan tasks#841

Draft
u70b3 wants to merge 1 commit into
apache:mainfrom
u70b3:issue-834-rest-data-sequence-number
Draft

REST: Support data sequence numbers in scan tasks#841
u70b3 wants to merge 1 commit into
apache:mainfrom
u70b3:issue-834-rest-data-sequence-number

Conversation

@u70b3

@u70b3 u70b3 commented Jul 24, 2026

Copy link
Copy Markdown

Summary

  • parse the optional task-level data-sequence-number in REST file scan tasks
  • serialize the field when a scan task's data file has a sequence number
  • enable the row-lineage sequence test and cover absent/null compatibility

Motivation

REST-planned scans can carry first-row-id, but C++ currently cannot receive the
manifest-entry data sequence number needed to inherit
_last_updated_sequence_number for v3 tables.

Closes #834

Compatibility and dependency

This is the C++ side only. The task-level data-sequence-number field is not yet
present in the upstream REST OpenAPI, so this PR remains draft pending agreement
and publication of that protocol field. Older servers that omit the field, and
explicit null, continue to produce an unset data sequence number.

Testing

  • pre-commit run --all-files
  • full CMake Debug build with GCC 14 and the repository-pinned CRoaring 4.4.3
  • full CTest suite (18/18 passed)
  • rest_catalog_test (317/317 passed)

AI assistance

This change was implemented with assistance from OpenAI Codex. I reviewed the
implementation and tests, verified the JSON compatibility behavior, and ran the
full lint/build/test checks above. The remaining uncertainty is the final
upstream REST OpenAPI field definition; this draft intentionally does not modify
the Java SDK or specification.

// but not the manifest-entry data sequence number. Until the REST API exposes
// it, REST-planned tasks cannot inherit _last_updated_sequence_number.
// See https://github.com/apache/iceberg-cpp/issues/834.
if (task_json.contains(kDataSequenceNumber) &&

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately we can't do this until the rest spec has adopted data sequence number to the FileScanTask object.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood — I'll keep this as a draft blocked on the upstream REST spec adopting the field. I don't plan to file the spec proposal right now; happy to revisit once the protocol supports it. Feel free to close this PR if you'd rather not keep it open in the meantime.

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.

Support data sequence numbers in REST scan tasks

2 participants