Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cqltypes: Serialize None values in collections as NULLs #1173

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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
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