Skip to content

fix: preserve sql.NullBool values in columnar appends - #1954

Open
fallintoplace wants to merge 1 commit into
ClickHouse:mainfrom
fallintoplace:fix/columnar-null-bool
Open

fix: preserve sql.NullBool values in columnar appends#1954
fallintoplace wants to merge 1 commit into
ClickHouse:mainfrom
fallintoplace:fix/columnar-null-bool

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

Summary

Columnar appends of []sql.NullBool and []*sql.NullBool were recursively calling the bulk append method and ignoring its errors. This could leave the value column with zero rows while returning nil, and invalid values were not marked in the NULL bitmap.

This change uses AppendRow, preserves the NULL bitmap, and safely handles nil *sql.NullBool values.

Testing

  • go test ./... -count=1
  • go vet ./lib/column

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