You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "plusplusjiajia (via GitHub)" <gi...@apache.org> on 2026/04/19 01:43:38 UTC
[PR] feat(datafusion): Add $snapshots system table [paimon-rust]
plusplusjiajia opened a new pull request, #264:
URL: https://github.com/apache/paimon-rust/pull/264
### Purpose
Mirrors Java SnapshotsTable: exposes `<table>$snapshots` with 14 columns matching Java `SnapshotsTable.TABLE_TYPE`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(datafusion): Add $snapshots system table [paimon-rust]
Posted by "luoyuxia (via GitHub)" <gi...@apache.org>.
luoyuxia commented on code in PR #264:
URL: https://github.com/apache/paimon-rust/pull/264#discussion_r3137457313
##########
crates/paimon/src/table/snapshot_manager.rs:
##########
@@ -150,6 +151,28 @@ impl SnapshotManager {
self.find_by_list_files(i64::min).await
}
+ /// List all snapshot ids sorted ascending.
+ pub async fn list_all_ids(&self) -> crate::Result<Vec<i64>> {
+ let snapshot_dir = self.snapshot_dir();
+ let statuses = self.file_io.list_status(&snapshot_dir).await?;
Review Comment:
Seems it will return error when the snapshot dir doesn't exists. Is it expected to return error instead of empty vec?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(datafusion): Add $snapshots system table [paimon-rust]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on code in PR #264:
URL: https://github.com/apache/paimon-rust/pull/264#discussion_r3122518969
##########
crates/paimon/src/table/snapshot_manager.rs:
##########
@@ -90,26 +91,20 @@ impl SnapshotManager {
id_str.trim().parse().ok()
}
- /// List snapshot files and find the id using the given reducer (min or max).
- async fn find_by_list_files(&self, reducer: fn(i64, i64) -> i64) -> crate::Result<Option<i64>> {
Review Comment:
Why modify this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(datafusion): Add $snapshots system table [paimon-rust]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #264:
URL: https://github.com/apache/paimon-rust/pull/264
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(datafusion): Add $snapshots system table [paimon-rust]
Posted by "plusplusjiajia (via GitHub)" <gi...@apache.org>.
plusplusjiajia commented on code in PR #264:
URL: https://github.com/apache/paimon-rust/pull/264#discussion_r3130833459
##########
crates/paimon/src/table/snapshot_manager.rs:
##########
@@ -90,26 +91,20 @@ impl SnapshotManager {
id_str.trim().parse().ok()
}
- /// List snapshot files and find the id using the given reducer (min or max).
- async fn find_by_list_files(&self, reducer: fn(i64, i64) -> i64) -> crate::Result<Option<i64>> {
Review Comment:
The refactor shares the directory-scan logic between the existing find_by_list_files and the new list_all_ids, I will revert it to keep this PR scoped to $snapshots.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(datafusion): Add $snapshots system table [paimon-rust]
Posted by "plusplusjiajia (via GitHub)" <gi...@apache.org>.
plusplusjiajia commented on code in PR #264:
URL: https://github.com/apache/paimon-rust/pull/264#discussion_r3137605321
##########
crates/paimon/src/table/snapshot_manager.rs:
##########
@@ -150,6 +151,28 @@ impl SnapshotManager {
self.find_by_list_files(i64::min).await
}
+ /// List all snapshot ids sorted ascending.
+ pub async fn list_all_ids(&self) -> crate::Result<Vec<i64>> {
+ let snapshot_dir = self.snapshot_dir();
+ let statuses = self.file_io.list_status(&snapshot_dir).await?;
Review Comment:
@luoyuxia Good catch, thanks! Updated to return an empty vec when the
snapshot directory doesn't exist.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org