When reading a table's metadata via the Go SDK, it appears to always be zero even if rows have recently been inserted.
I see that this was brought up in #41 and reportedly fixed in #46 (which equates to version 0.1.12), but it doesn't work even when pinning the version to back then. #249 mentions a similar issue, but didn't include enough details to reproduce so it stalled.
What happened?
When reading a table's metadata via the Go SDK, it appears to always be zero even if rows have recently been inserted.
I see that this was brought up in #41 and reportedly fixed in #46 (which equates to version
0.1.12
), but it doesn't work even when pinning the version to back then. #249 mentions a similar issue, but didn't include enough details to reproduce so it stalled.The SDK entry-point is here: https://pkg.go.dev/cloud.google.com/go/bigquery#Table.Metadata
Explicitly setting a
TableMetadataView
, such asBasicMetadataView
orFullMetadataView
doesn't change the outcome.What did you expect to happen?
I'd expect the
NumRows
value in metadata to match the behavior of normal BigQuery.How can we reproduce it (as minimally and precisely as possible)?
Below is a fully reproducible example using a standard Go test +
testcontainers
to init the emulator. Expects thatdocker
is available.To setup the test, do the following:
Anything else we need to know?
No response