Skip to content

Fix bug when converting Vectors containing None (or null) into SQL#815

Merged
tminglei merged 2 commits intotminglei:masterfrom
aelred:none-vector-bug
Mar 10, 2026
Merged

Fix bug when converting Vectors containing None (or null) into SQL#815
tminglei merged 2 commits intotminglei:masterfrom
aelred:none-vector-bug

Conversation

@aelred
Copy link
Copy Markdown
Contributor

@aelred aelred commented Feb 16, 2026

isArray always reports false when tokens are in a Vector - this can happen if the original values are in a Vector, and can cause nulls to be removed from the output, e.g.

import org.joda.time.DateTime as JodaDateTime

implicit val optJodaDateTimeArraySetParameter: SetParameter[Seq[Option[JodaDateTime]] = {
  mkArraySetParameter[Option[JodaDateTime]]("timestamptz", _.map(_.toString(myFormatter)).orNull)
}

This converts Vector(None, None) into {,}.

fixes #814

@tminglei tminglei merged commit e9d6697 into tminglei:master Mar 10, 2026
0 of 24 checks passed
@tminglei
Copy link
Copy Markdown
Owner

Merged. Thanks! 👍

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 in Vector[Option[..]] incorrectly sent as empty string

3 participants