Use spaniter ResultSetStats helpers#45
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the github.com/apstndb/spaniter dependency and refactors BuildResultSet and BuildResultSetFromParts to utilize the spaniter.Stats struct instead of passing individual query plan, query stats, and row count parameters. The review feedback suggests adding a defensive nil check for rowIter in BuildResultSet to prevent potential nil pointer dereferences, along with importing the errors package to support this check.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates the github.com/apstndb/spaniter dependency to version v0.1.1-alpha.3 and refactors the result set construction logic. Specifically, BuildResultSet and BuildResultSetFromParts in jqresult/protojson.go have been updated to accept and utilize the spaniter.Stats struct instead of passing individual query plan, query stats, and row count parameters. Callers in main.go have been updated accordingly to pass result.Stats directly. There are no review comments, and I have no additional feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates the github.com/apstndb/spaniter dependency to v0.1.1-alpha.3 and refactors BuildResultSet and BuildResultSetFromParts in the jqresult package to utilize the spaniter.Stats struct. It also adds a nil check for the row iterator in BuildResultSet along with a corresponding unit test. I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Summary
spanitertov0.1.1-alpha.3.spaniter.Statsas the boundary when rebuilding*sppb.ResultSetfor jq inputs.ResultSetStatsconstruction and empty-stats checks withStats.ResultSetStatsandStats.IsZero.Context
This validates the downstream use case that motivated the new spaniter helpers:
execspansqlalready drains/consumes*spanner.RowIteratorthrough spaniter, then needs to expose the captured lifecycle data as a protobufResultSet.Tests
go test ./...make test