Skip to content

Commit

Permalink
fix: SIGSEGV when describe empty table (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-kar authored Sep 14, 2024
1 parent 711d78c commit ae2a019
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/iceberg/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,13 @@ func (t text) DescribeTable(tbl *table.Table) {
}).Render()

t.Schema(tbl.Schema())
snap := ""
if tbl.CurrentSnapshot() != nil {
snap = tbl.CurrentSnapshot().String()
}
pterm.DefaultTable.
WithData(pterm.TableData{
{"Current Snapshot", tbl.CurrentSnapshot().String()},
{"Current Snapshot", snap},
}).Render()
pterm.DefaultTree.WithRoot(snapshotTreeNode).Render()
pterm.Println("Properties")
Expand Down

0 comments on commit ae2a019

Please sign in to comment.