Open
Description
An example Presto query
SELECT numeric_histogram(3, v, 1.0)
FROM (
VALUES (10),
(15),
(20),
(25),
(30)
) AS t(v);
returns the expected answer {30.0->1.0, 22.5->2.0, 12.5->2.0}
, but also returns a warning:
WARNING: Map keys with real/double type can be non-deterministic. Please use decimal type instead Expression:"numeric_histogram"(3, v, DECIMAL '1.0') line 1:8
In conversation with @tdcmeehan, he replied to this warning's appearance with "we shouldn't have a built-in function that returns this warning (the user can't do anything about it)".
The warning should not be displayed to the user if no change in their actions can avoid this result.
Your Environment
- Presto version used: 0.290
Expected Behavior
The warning should not be displayed.
Current Behavior
An example Presto query
SELECT numeric_histogram(3, v, 1.0)
FROM (
VALUES (10),
(15),
(20),
(25),
(30)
) AS t(v);
returns the expected answer {30.0->1.0, 22.5->2.0, 12.5->2.0}
, but also returns a warning:
WARNING: Map keys with real/double type can be non-deterministic. Please use decimal type instead Expression:"numeric_histogram"(3, v, DECIMAL '1.0') line 1:8
Steps to Reproduce
- Run the query in Current Behavior.
- The warning shown is displayed.
Context
I was verifying the Presto examples contributed to the Presto documentation in #25194, encountered this warning. Asked @tdcmeehan about it, and based on his response I opened this issue.
Metadata
Metadata
Assignees
Type
Projects
Status
🆕 Unprioritized