tanmayrauth commented on code in PR #1430:
URL: https://github.com/apache/iceberg-go/pull/1430#discussion_r3566810552
##########
table/table.go:
##########
@@ -112,11 +114,20 @@ func (t Table) Schema() *iceberg.Schema
{ return t.metadata
func (t Table) Spec() iceberg.PartitionSpec { return
t.metadata.PartitionSpec() }
func (t Table) SortOrder() SortOrder { return
t.metadata.SortOrder() }
func (t Table) Properties() iceberg.Properties { return
t.metadata.Properties() }
-func (t Table) NameMapping() iceberg.NameMapping { return
t.metadata.NameMapping() }
-func (t Table) Location() string { return
t.metadata.Location() }
-func (t Table) CurrentSnapshot() *Snapshot { return
t.metadata.CurrentSnapshot() }
-func (t Table) SnapshotByID(id int64) *Snapshot { return
t.metadata.SnapshotByID(id) }
-func (t Table) SnapshotByName(name string) *Snapshot { return
t.metadata.SnapshotByName(name) }
+
+// MetricsReporter returns the table's metrics reporter, never nil.
+func (t Table) MetricsReporter() metrics.Reporter {
Review Comment:
Good catch, both paths were dropping the reporter. Fixed it:
- doCommit (table/table.go:576) now returns New(...,
WithMetricsReporter(t.MetricsReporter())), so tables from
Transaction.Commit/AppendTable carry the configured reporter forward and scans
off them keep reporting instead of
falling back to NopReporter.
- Transaction.Scan (table/transaction.go) now seeds reporter:
t.tbl.MetricsReporter(), matching Table.Scan.
MetricsReporter() is nil-safe (returns NopReporter{} when unset), so both
paths stay safe when no reporter was configured.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]