Skip to content

Null type becomes BOOL #928

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

Closed
sergiors opened this issue Dec 26, 2021 · 4 comments
Closed

Null type becomes BOOL #928

sergiors opened this issue Dec 26, 2021 · 4 comments
Labels
feature-request feature request

Comments

@sergiors
Copy link

Is your feature request related to a problem? Please describe.

I did a stream to copy dynamodb to elasticsearch, I used the object DynamoDBStreamEvent, until that okey,
but when I try get the values, the null type becomes a boolean type.

Describe the solution you'd like

I read the source-code the AttributeValue.null_value and think the null value should back to python native value, like described in boto3 types

Describe alternatives you've considered

Additional context

As alternative to fix the stream copy, the only value that I need to check is the null value.

{k: v.get_value if not v.null_value else None for k, v in dct.items()}
@sergiors sergiors added feature-request feature request triage Pending triage from maintainers labels Dec 26, 2021
@boring-cyborg
Copy link

boring-cyborg bot commented Dec 26, 2021

Thanks for opening your first issue here! We'll come back to you as soon as we can.

@michaelbrewer
Copy link
Contributor

Been a while since i did this, but if this is for deserialization, then "NULL": true would map to Python None.

I will double check @heitorlessa

@michaelbrewer
Copy link
Contributor

@sergiors @heitorlessa
Ok i made a PR to fix this (#929). It would be a breaking change (if you where expecting null_value to return a boolean), however this was the wrong behavior.

FYI, get_value is a convenient way to get the value out.

@heitorlessa heitorlessa added pending-release Fix or implementation already in dev waiting to be released and removed triage Pending triage from maintainers labels Dec 29, 2021
@github-actions
Copy link
Contributor

This is now released under 1.25.10 version!

@github-actions github-actions bot removed the pending-release Fix or implementation already in dev waiting to be released label Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request feature request
Projects
None yet
Development

No branches or pull requests

3 participants