Skip to content
This repository has been archived by the owner on Jul 14, 2023. It is now read-only.

Table Storage SDK treatment of Int32 / Int64 is sub-optimal. #32

Open
sjwaight opened this issue Aug 17, 2018 · 2 comments
Open

Table Storage SDK treatment of Int32 / Int64 is sub-optimal. #32

sjwaight opened this issue Aug 17, 2018 · 2 comments

Comments

@sjwaight
Copy link

Following link from Python Storage SDK and posting here.

Service

Table

Which version of the SDK was used? Please provide the output of pip freeze.

azure-storage 0.36.0

What problem was encountered?

SDK does not work as expected when dealing with Int32 / Int64 values in table storage.

If you assign an 'int' to a table column read from storage that is Int32 the SDK happily writes it back as Int64. This breaks expected behaviour and seems to be the result of the default Int64 change in 0.31.0.

The majority of other language SDKs still default to Int32 so integration into a solution that leverages table storage through various other languages results in unexpected issues too.

Have you found a mitigation/solution?

Yes. You must explicitly assign the 'int' value to the 'value' property of the inbound entity column rather than simply assigning the 'int' to the column. This is clunky to code with.

@huajunzhao
Copy link

Is there any fix?

@sjwaight
Copy link
Author

sjwaight commented Jul 6, 2020

As per mitigation - you must explicitly use the Int type you wish to write to Table Storage.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants