Skip to content

[postgres] sql_simple_queries: 1 + odata_new_adapter: true breaks ieee754compatible: false #860

@hakimio

Description

@hakimio

Reopening #838 since the original was closed without actually addressing the issue.
Adding TLDR section this time to make sure people understand the issue before closing it.

TLDR

odata_new_adapter: false + sql_simple_queries: 0 + ieee754compatible: false => decimals correctly returned as numbers
odata_new_adapter: false + sql_simple_queries: 1 + ieee754compatible: false => decimals correctly returned as numbers
odata_new_adapter: true + sql_simple_queries: 0 + ieee754compatible: false => decimals correctly returned as numbers
odata_new_adapter: true + sql_simple_queries: 1 + ieee754compatible: false => decimals incorrectly returned as strings


Description of erroneous behaviour

Combination of sql_simple_queries and odata_new_adapter features breaks "ieee754compatible": false setting.

Detailed steps to reproduce

  • Use the following feature toggle combination:
{
    "features": {
        "odata_new_adapter": true,
        "ieee754compatible": false,
        "sql_simple_queries": 1
    }
}

Also, reproducable with "sql_simple_queries": 2

  • Try to make some odata API queries which includes $select, $filter, $apply or pagination parameters.
  • ieee754compatible setting is ignored and decimal/int64 values are returned as strings

Details about your project

Package Version
@cap-js/asyncapi 1.0.2
@cap-js/cds-types 0.6.5
@cap-js/openapi 1.0.6
@cap-js/postgres 1.10.0
@sap/cds 8.3.1
@sap/cds-compiler 5.3.2
@sap/cds-dk 8.3.0
@sap/cds-foss 5.0.1
@sap/cds-mtxs 2.2.0
@sap/eslint-plugin-cds 3.1.0
Node.js v20.13.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions