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

covar_pop returns -Infinity result for INFINITY input #10627

Open
kewang1024 opened this issue Jul 31, 2024 · 3 comments
Open

covar_pop returns -Infinity result for INFINITY input #10627

kewang1024 opened this issue Jul 31, 2024 · 3 comments
Labels
bug Something isn't working fuzzer-found triage Newly created issue that needs attention.

Comments

@kewang1024
Copy link
Contributor

Bug description

create TABLE test_ke (name varchar, score double, score2 double, ds varchar) WITH (partitioned_by = ARRAY['ds'] );

INSERT INTO test_ke
VALUES
('a', 1.1, 2.0, '2023-05-01'),
('a', INFINITY(), 1.0, '2023-05-01'),

select covar_pop(score, score2) FROM test_ke group by name;

[Presto java result]
NaN

[DuckDB result]
NaN

[Presto c++ result]
-Infinity

System information

NA

Relevant logs

No response

@kewang1024 kewang1024 added bug Something isn't working triage Newly created issue that needs attention. fuzzer-found labels Jul 31, 2024
@Yuhta
Copy link
Contributor

Yuhta commented Jul 31, 2024

I would say our result is more correct in this case (just replace INFINITY() with a huge number to see why). No one should depend on such result though, if it is easy to fix we can change it to make it consistent, otherwise we can just leave it as it is.

@kagamiori
Copy link
Contributor

@Yuhta Should we make Presto-Java match Velox then in this case? Since if Presto and Velox do not match, the fuzzer will just fail.

@Yuhta
Copy link
Contributor

Yuhta commented Aug 1, 2024

@kagamiori That would be ideal if we could

@kewang1024 kewang1024 changed the title covar_pop returns wrong result for INFINITY input covar_pop returns -Infinity result for INFINITY input Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fuzzer-found triage Newly created issue that needs attention.
Projects
None yet
Development

No branches or pull requests

3 participants