Skip to content

Conversation

@wgtmac
Copy link
Member

@wgtmac wgtmac commented Jan 5, 2026

No description provided.

/// \param from_snapshot_id the start snapshot ID (inclusive)
/// \note InvalidArgument will be returned if the start snapshot is not an ancestor of
/// the end snapshot
TableScanBuilder& FromSnapshotInclusive(int64_t from_snapshot_id);
Copy link
Contributor

Choose a reason for hiding this comment

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

TableScanBuilder& FromSnapshot(int64_t from_snapshot_id, bool inclusive);
TableScanBuilder& FromSnapshot(const std::string& ref, bool inclusive);

How about merging these interfaces of FromSnapshot into this one? Can ref also be changed to tag? SnapshotRef might be Branch or Tag. Using ref here would be a bit strange

Copy link
Member Author

Choose a reason for hiding this comment

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

It makes sense to combine them. I don't think the ref applies to tag.

std::optional<int64_t> limit;
bool from_snapshot_id_inclusive{false};
std::optional<int64_t> from_snapshot_id;
std::optional<int64_t> to_snapshot_id;
Copy link
Contributor

Choose a reason for hiding this comment

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

How about defining a VersionRange or DataRange to express a specific version or version range?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think that may be a little bit complicated and from/to do not need to appear at the same time.

Copy link
Contributor

Choose a reason for hiding this comment

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

snapshot_id can also be expressed as [-1, snapshot_id], It can avoid passing multiple parameters when used internally.

Copy link
Member Author

Choose a reason for hiding this comment

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

Let's revisit this once we add incremental scan support.

wgtmac and others added 3 commits January 6, 2026 16:13
Co-authored-by: Guotao Yu <guotao.yugt@gmail.com>
Co-authored-by: Guotao Yu <guotao.yugt@gmail.com>
Co-authored-by: Zehua Zou <zehuazou2000@gmail.com>
@wgtmac
Copy link
Member Author

wgtmac commented Jan 6, 2026

Thanks all for the review!

@wgtmac wgtmac merged commit b7b5dd1 into apache:main Jan 6, 2026
10 checks passed
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.

5 participants