Skip to content

Conversation

@Lorak-mmk
Copy link
Contributor

When using parepared statements, None values in collections were serialized as empty values (values with length == 0). This is unexpected and inconsistent - None values are serialized as NULLs (vlaues with length == -1) in other cases:

  • Statement arguments, both for simple and prepared statements
  • Collection elements in simple statement

This PR fixes this weird behavior - now None values should be serialized as NULLs in all cases. It also adds an integration test that checks new behavior.

Fixes https://datastax-oss.atlassian.net/jira/software/c/projects/PYTHON/issues/PYTHON-1355

When using parepared statements, None values in collections
were serialized as empty values (values with length == 0). This is unexpected and
inconsistent - None values are serialized as NULLs (vlaues with length == -1) in other cases:
 - Statement arguments, both for simple and prepared statements
 - Collection elements in simple statement

This commit fixes this weird behavior - now None values should be serialized as NULLs in all cases.
It also adds an integration test that checks new behavior.

Fixes https://datastax-oss.atlassian.net/jira/software/c/projects/PYTHON/issues/PYTHON-1355
@Lorak-mmk
Copy link
Contributor Author

I assume there is no interest in this PR, so closing.

@Lorak-mmk Lorak-mmk closed this Nov 17, 2025
@absurdfarce
Copy link
Collaborator

Sorry @Lorak-mmk , this one just slipped through the cracks. I'd be interested in taking a look at this but we're in something of a freeze right now waiting for this driver to be donated to the ASF so I'm trying to hold off on new commits until that's complete.

When it is done I'd like to revisit this idea if you're open to it.

Thanks!

@Lorak-mmk
Copy link
Contributor Author

Ok, thanks for the info. Reopening.

@Lorak-mmk Lorak-mmk reopened this Nov 17, 2025
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.

2 participants