If the metric for a big number chart has the type DECIMAL, the chart displays an error: No data after filtering or data is NULL for the latest time record
From inspecting the request result for /api/v1/chart/data, it seems like this occurs because the decimal is analyzed as a string.
How to reproduce the bug
- Run query in sqllab:
SELECT CAST(1 AS DECIMAL) AS x, DATE('2022-01-27') AS ds
- Explore chart
- Select big number chart, use
SUM(x) as metric
- Run.
Expected results
Chart shows big number with value 1. Data returned from /api/v1/chart/data is [{SUM(x): 1}]
Actual results
Error is shown. Data returned from /api/v1/chart/data is [{SUM(x): "1"}]
Screenshots

Environment
Up to date with apache/master as of 2022-01-26.
Presto SQL
Checklist
Make sure to follow these steps before submitting your issue - thank you!
Additional context
If the metric for a big number chart has the type DECIMAL, the chart displays an error:
No data after filtering or data is NULL for the latest time recordFrom inspecting the request result for
/api/v1/chart/data, it seems like this occurs because the decimal is analyzed as a string.How to reproduce the bug
SELECT CAST(1 AS DECIMAL) AS x, DATE('2022-01-27') AS dsSUM(x)as metricExpected results
Chart shows big number with value
1. Data returned from/api/v1/chart/datais[{SUM(x): 1}]Actual results
Error is shown. Data returned from
/api/v1/chart/datais[{SUM(x): "1"}]Screenshots
Environment
Up to date with apache/master as of 2022-01-26.
Presto SQL
Checklist
Make sure to follow these steps before submitting your issue - thank you!
Additional context