zeroshade commented on code in PR #1430:
URL: https://github.com/apache/iceberg-go/pull/1430#discussion_r3566743507
##########
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:
The reporter added here isn't propagated on commit. `doCommit` (around
`table/table.go:576`) returns `New(t.identifier, newMeta, newLoc, t.fsF,
t.cat)` without `WithMetricsReporter(t.MetricsReporter())`, so tables returned
from `Transaction.Commit`/`AppendTable` silently fall back to `NopReporter`,
and subsequent scans from them stop reporting. `Transaction.Scan` (around
`table/transaction.go:2106`) similarly doesn't seed `reporter` the way
`Table.Scan` does. Please carry `MetricsReporter()` through both paths.
--
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]