Skip to content

[spanner] Expose query stats in RowIterator#407

Merged
yoshidan merged 2 commits intoyoshidan:mainfrom
danielnorberg:dano/spanner-query-stats
Nov 16, 2025
Merged

[spanner] Expose query stats in RowIterator#407
yoshidan merged 2 commits intoyoshidan:mainfrom
danielnorberg:dano/spanner-query-stats

Conversation

@danielnorberg
Copy link
Copy Markdown
Contributor

Add ability to retrieve query execution statistics from RowIterator after consuming all rows. Stats include query plan, execution metrics, and row counts when using QueryMode that includes stats (Profile, WithStats, or WithPlanAndStats).

Changes:

  • Add stats field to RowIterator struct to store ResultSetStats
  • Capture stats from final PartialResultSet in try_recv()
  • Add public stats() accessor method with documentation

🤖 Generated with Claude Code

danielnorberg and others added 2 commits November 13, 2025 21:30
Add ability to retrieve query execution statistics from RowIterator after
consuming all rows. Stats include query plan, execution metrics, and row
counts when using QueryMode that includes stats (Profile, WithStats, or
WithPlanAndStats).

Changes:
- Add stats field to RowIterator struct to store ResultSetStats
- Capture stats from final PartialResultSet in try_recv()
- Add public stats() accessor method with documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@danielnorberg danielnorberg marked this pull request as ready for review November 13, 2025 21:48
@danielnorberg
Copy link
Copy Markdown
Contributor Author

Tested against production spanner and it seems to work as expected.

@yoshidan yoshidan added the safe to test safe to test label Nov 14, 2025
@yoshidan yoshidan merged commit c8a6c8d into yoshidan:main Nov 16, 2025
8 of 9 checks passed
@yoshidan
Copy link
Copy Markdown
Owner

Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test safe to test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants