Skip to content

sio/csvio: fix missing field output - #7483

Merged
nwt merged 2 commits into
mainfrom
csvio-none
Oct 15, 2026
Merged

nwt merged 2 commits into
mainfrom
csvio-none

Conversation

@nwt

@nwt nwt commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

The CSV writer emits "none" for a missing field like the one in {a:none::(int64|none)}. Emit an empty string instead.

Fixes #7443.

The CSV writer emits "none" for a missing field like the one in
{a:none::(int64|none)}.  Emit an empty string instead.
@nwt
nwt requested a review from a team October 15, 2026 17:42
Comment thread sio/csvio/ztests/none.yaml Outdated
flags: -f csv

input: |
{none:none::(int64|none)}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe add an option none as well?

Suggested change
{none:none::(int64|none)}
{none:none::(int64|none)}
{none:none::option(int64)}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Busted! An option none still prints as "none" (actually as "none::") because super.Value.Under doesn't deoption. I was going to do that in another PR.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ok

@nwt
nwt merged commit aa33d2f into main Oct 15, 2026
2 checks passed
@nwt
nwt deleted the csvio-none branch October 15, 2026 17:57
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.

None value leaking into CSV output as "none" string

2 participants