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

listEntities always returns an Int32 type for a value of "1.23456789012346e+24" #18148

Closed
2 of 5 tasks
craxal opened this issue Oct 12, 2021 · 1 comment · Fixed by #18211
Closed
2 of 5 tasks

listEntities always returns an Int32 type for a value of "1.23456789012346e+24" #18148

craxal opened this issue Oct 12, 2021 · 1 comment · Fixed by #18211
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Tables

Comments

@craxal
Copy link
Member

craxal commented Oct 12, 2021

  • Package Name: @azure/data-tables
  • Package Version: 12.1.1
  • Operating system: Windows
  • nodejs
    • version: 14.16.0
  • typescript
    • version: 4.4.2
  • Is the bug related to documentation in

Describe the bug
When calling listEntities(), one of the entities in my table contains a value of "1.23456789012346e+24". This is clearly beyond the limits of an Int32 value, yet Int32 is the type that's returned by the SDK. This happens even if the value is explicitly inserted as a Double.

To Reproduce
Steps to reproduce the behavior:

  1. Write the following program:
let client = new TableClient("https://myacct.table.core.windows.net", "mytable", someCred);
const inputEntity = {
    partitionKey: "0",
    rowKey: "0",
    Value: { value: "1.23456789012346e+24", type: "Double" }
};
await client.insertEntity(inputEntity);

let response = client.listEntities();
let next = await response.next();
let entity = next.value;

Expected behavior
I would expect inputEntity to have the same value as entity.

Instead, entity has a value of:

 {
    partitionKey: "0",
    rowKey: "0",
    Value: { value: "1.23456789012346e+24", type: "Int32" }
};

Screenshots
N/A

Additional context
N/A

@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Oct 12, 2021
@ramya-rao-a ramya-rao-a added Client This issue points to a problem in the data-plane of the library. Tables labels Oct 12, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Oct 12, 2021
@ramya-rao-a ramya-rao-a added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Oct 14, 2021
@ghost ghost added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Oct 14, 2021
@joheredi
Copy link
Member

@craxal thanks for reporting this issue. I was able to get a local repro. The problem is that the service is not sending enough metadata to tell this is a double and our check is missing checking if the number is a safe integer or not.

I'm preparing a PR for this fix and will send it out soon

@joheredi joheredi removed the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Oct 15, 2021
@joheredi joheredi added this to the [2021] November milestone Oct 15, 2021
azure-sdk pushed a commit to azure-sdk/azure-sdk-for-js that referenced this issue Apr 18, 2022
[Hub Generated] Public private branch 'elastic-san-preview' (Azure#18148)

* Initial Check-In to introduce ElasticSan RP

* Applied coding styles and fixed the spelling mistake.

* Updated with IOPS & MBps properties

* Updated swagger file with NetWork Acls

* Added "None" to protocol type and updated with other validations.

* Removed ElasticSan from VolumeGroup operations

* Addressed review comments by adding elasticSanName in each of its operation

* Added volumeGroupName Parameters to the operations

* Upated array item with "x-ms-identifiers": [] as per Swagger Lint recommendations

* Removed unused parameters

* Updated with Snapshot endpoints

* Updated with missing "type" declarations

* Added Snapshot changes and addressed the PR review comments

* Fixed Lint differences

* Fixed Lint difference

* Added Export feature for Snapshot

* Updated with Sku level settings

* Updated with AdditionalInfo with "x-ms-identifiers": []

* Fixed Lint compilation issue with "x-ms-identifiers": [],

* Fixed Prettier issues

* Updated the readme* files with the right package and namespaces.

* Pointed GO to track2

* Updated readme.go.md with the yaml format

* Addressed review comments, updated with ecommon types and added naming restrictions.

* Updated with common SystemData

* Corrected the missing json structure

* Updated 'CreateOrUpdate" with "Create"

* Updated the spec with Network ACLs

* Removed unnecessary error codes

* Regenerated the examples

* Removed Snapshot API and addressed PR comments (Azure#18638)

* Removed Snapshot API and addressed PR comments

* Removed Ruby SDK information (Azure#18662)

* Reverted tsconfig.json and removed Ruby related SDK information.

* Corrected the indentation for swagger-to-sdk

Co-authored-by: Rajesh Kumar Aggani <[email protected]>
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Tables
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants