Skip to content

Better int64 support #24499

Open
Open
@lovettchris

Description

@lovettchris

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

Python integers are variable sized, for example:

>>> import sys
>>> sys.getsizeof(int(19283612873512536))
32
>>> sys.getsizeof(int(192836128735125361239862))
36
>>> sys.getsizeof(int(1928361287351253612398621293876))
40

but the current azure.data.tables entity serialization maps all python integers to int32 on Azure, which is not very friendly because you are bound to hit a nasty error at runtime when your python integer overflows int32. Then you have to monkey around the documentation and if you are lucky you discover EntityProperty(memory, EdmType.INT64) and change all your code to handle that properly and unwrap it on deserialization, etc. which is a big mess.

Describe the solution you'd like
It would be cool if this auto-conversion to int64 (or even bigger) and back to python int was completely transparent and handled in the serialization layer.

Describe alternatives you've considered
I am now using EntityProperty(memory, EdmType.INT64) but I'm not happy with it. This topic should be dealt with on page 1 of the python SDK, pointing out "int" in python is special. I don't know if you do this already, but you could also add special handling for numpy int64 datatype.

Additional context
N/A

Metadata

Metadata

Labels

ClientThis issue points to a problem in the data-plane of the library.Tablescustomer-reportedIssues that are reported by GitHub users external to the Azure organization.feature-requestThis issue requires a new behavior in the product in order be resolved.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions