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

Crash bug in APPROX_PERCENTILE_CONT aggregate function (SQLancer) #11870

Closed
2010YOUY01 opened this issue Aug 7, 2024 · 0 comments · Fixed by #11934
Closed

Crash bug in APPROX_PERCENTILE_CONT aggregate function (SQLancer) #11870

2010YOUY01 opened this issue Aug 7, 2024 · 0 comments · Fixed by #11934
Labels
bug Something isn't working

Comments

@2010YOUY01
Copy link
Contributor

Describe the bug

See full reproducer in datafusion-cli:

DataFusion CLI v40.0.0
> /*DML*/CREATE TABLE t1(v0 BIGINT, v1 STRING, v2 STRING, v3 BIGINT);
/*DML*/INSERT INTO t1(v3, v2, v0) VALUES (-12297124, 'X}', 1), (2077280913, '', 0), (1, '', -844943143);

0 row(s) fetched.
Elapsed 0.066 seconds.

+-------+
| count |
+-------+
| 3     |
+-------+
1 row(s) fetched.
Elapsed 0.048 seconds.

> SELECT APPROX_PERCENTILE_CONT('NaN'::Double, 0.8)
FROM t1
WHERE ('+Inf'::Double) > t1.v3;
thread 'main' panicked at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/num/f64.rs:1509:9:
min > max, or either was NaN. min = NaN, max = -inf
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

To Reproduce

No response

Expected behavior

No response

Additional context

Found by SQLancer #11030

@2010YOUY01 2010YOUY01 added the bug Something isn't working label Aug 7, 2024
@2010YOUY01 2010YOUY01 changed the title Crash bug in APPROX_PERCENTILE_CONT aggregate function Crash bug in APPROX_PERCENTILE_CONT aggregate function (SQLancer) Aug 7, 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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant