Skip to content

Populate QueryStats in ResultSetStats #779

Closed

Description

@apstndb

Is your feature request related to a problem? Please describe.

QueryStats is important for both apps and toolsneeding stats reporting, but it is not populated.

func createResultSetStats(it *spanner.RowIterator, stmtType parser.StatementType) *sppb.ResultSetStats {
// TODO: The Spanner client library should offer an option to get the full
// ResultSetStats, instead of only the RowCount and QueryPlan.
stats := &sppb.ResultSetStats{
QueryPlan: it.QueryPlan,
}

Describe the solution you'd like
QueryStats is populated after consuming RowIterator.

Describe alternatives you've considered

  • Use lower-level google-cloud-go/spanner
  • Fork go-sql-spanner

Additional context

I am trying to implement spanner-cli alternative using go-sql-spanner

Activity

  1. added
    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
    priority: p3Desirable enhancement or fix. May not be included in next release.
    on Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p3Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址