You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "amogh-jahagirdar (via GitHub)" <gi...@apache.org> on 2023/09/16 04:21:07 UTC

[GitHub] [iceberg] amogh-jahagirdar commented on a diff in pull request #8570: Python: Add list-refs CLI command

amogh-jahagirdar commented on code in PR #8570:
URL: https://github.com/apache/iceberg/pull/8570#discussion_r1327900746


##########
python/pyiceberg/cli/output.py:
##########
@@ -127,6 +128,33 @@ def describe_table(self, table: Table) -> None:
         output_table.add_row("Properties", table_properties)
         Console().print(output_table)
 
+    def describe_refs(self, ref_tups: List[Tuple[str, SnapshotRef]]):
+        refs_table = RichTable(title="Snapshot Refs")
+        refs_table.add_column("Type")
+        refs_table.add_column("Ref")
+        refs_table.add_column("Max ref age ms")
+        refs_table.add_column("Min snapshots to keep")
+        refs_table.add_column("Max snapshot age ms")
+
+        for ref_tup in ref_tups:
+            name = ref_tup[0]
+            ref = ref_tup[1]
+            if ref.snapshot_ref_type == 'branch':
+                min_snapshots_to_keep = str(ref.min_snapshots_to_keep)

Review Comment:
   Still thinking through what's the best way to surface to a user these properties aren't set. I wonder if the current outputting of "None" will confuse users



-- 
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@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org