Skip to content

Table Visualization distortion of big numbers on UInt64 type #6159

@Nopius

Description

@Nopius

Issue Summary

Bug appers with clickhouse data source and big numbers with UInt64 data type. Problem is proved to be on frontend/Visualizer side, because the returned XHR result is in correct format and with correct data.

Steps to Reproduce

  1. Create clickhouse data source.
  2. Create query in clickhouse data source:
SELECT 8722821678000304785

Note, this value is lower than max UInt64 (18,446,744,073,709,551,615)
3. Execute the query with network debug turned on
4. Check the network response:

{
    "query_result": {
        "id": 7932109,
        "query_hash": "38c14fd87388f3b88a159d215bfac6c8",
        "query": "select 8722821678000304785 LIMIT 1000",
        "data": {
            "columns": [
                {
                    "name": "8722821678000304785",
                    "friendly_name": "8722821678000304785",
                    "type": "integer"
                }
            ],
            "rows": [
                {
                    "8722821678000304785": 8722821678000304785
                }
            ]
        },
        "data_source_id": 67,
        "runtime": 0.4866828918457031,
        "retrieved_at": "2023-07-10T01:20:52.933Z"
    }
}
  1. Check visualizated value (wrong): 8,722,821,678,000,305,152
    image

NOTES

  1. When saving in CSV/TSV the values are correct, the problem appears only in a browser.
  2. The same distortion happens on real data when we select from a clickhouse table UInt64 field with a big value
  3. The value is also lower than signed Int64 (which is 9,223,372,036,854,775,807)
  4. Changing field type to 'text' in visualizer doesn't help.

Technical details:

  • Redash 10/Linux
  • Chrome/Windows:
  • How did you install Redash: docker image, runs in k8s

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions