Skip to content

Bump spanvalue to v0.5.0#38

Merged
apstndb merged 1 commit into
mainfrom
chore/bump-spanvalue-v0.5.0
Jun 4, 2026
Merged

Bump spanvalue to v0.5.0#38
apstndb merged 1 commit into
mainfrom
chore/bump-spanvalue-v0.5.0

Conversation

@apstndb
Copy link
Copy Markdown
Owner

@apstndb apstndb commented Jun 2, 2026

Summary

  • Upgrade github.com/apstndb/spanvalue from v0.4.1 to v0.5.0.
  • Handle NewCSVWriter returning (*DelimitedWriter, error) at all call sites.
  • Regolden testdata/experimental_csv/numeric.golden for Simple-format NUMERIC wire-as-is (99.5 instead of 99.500000000).

Test plan

  • go test ./...

Made with Cursor

Handle NewCSVWriter construction errors and regolden NUMERIC output to wire-as-is (99.5).

Co-authored-by: Cursor <cursoragent@cursor.com>
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request upgrades the github.com/apstndb/spanvalue dependency from v0.4.1 to v0.5.0. Consequently, calls to svwriter.NewCSVWriter have been updated to handle its new error return value in both main.go and csv_test.go. The golden test data for numeric values has also been updated to reflect formatting changes. There are no review comments, so 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.

Copy link
Copy Markdown
Owner Author

@apstndb apstndb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mechanical, correct upgrade to spanvalue v0.5.0. Verified locally:

  • All four NewCSVWriter call sites (2 in main.go, 3 in tests) now handle the new (*DelimitedWriter, error) signature; grep confirms no call site was missed.
  • The numeric.golden regolden (99.500000000 -> 99.5) matches the v0.5.0 release-note guidance to regolden NUMERIC exports for Simple-format wire-as-is output.
  • spanvalue/writer is the only spanvalue package imported, so the other breaking constructors (NewJSONLWriter, NewSQLInsertWriter) don't affect this repo. The go.mod hash in go.sum is unchanged, so there are no transitive dependency changes.
  • go build ./... and go test -run TestExperimentalCsv . pass.

LGTM. A couple of non-blocking notes inline.

Comment thread main.go
defer rowIter.Stop()

csvWriter := svwriter.NewCSVWriter(writer)
csvWriter, err := svwriter.NewCSVWriter(writer)
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking note: for the CSV case this error branch is effectively unreachable. NewCSVWriter only surfaces a configuration error for an invalid delimiter (Comma is hard-coded and always valid) or a failing option, and none of the call sites pass a fallible option. Handling it is still the right thing to do given the new signature, just flagging that it won't fire in practice.

@@ -1,2 +1,2 @@
v
99.500000000
99.5
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed intentional: spanvalue v0.5.0 SimpleFormatConfig emits the NUMERIC wire decimal string as-is (no nine-digit scale padding), and the release notes explicitly call out regoldening CSV/JSONL exports when upgrading from v0.4.1 or older. This is a user-visible output change for the experimental_csv format's NUMERIC columns; acceptable given the format is still experimental.

@apstndb apstndb merged commit 10ba1ef into main Jun 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant