Skip to content

Query with order by acos(sin(v1)) panic (SQLancer) #11552

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
2010YOUY01 opened this issue Jul 19, 2024 · 2 comments · Fixed by #11559
Closed

Query with order by acos(sin(v1)) panic (SQLancer) #11552

2010YOUY01 opened this issue Jul 19, 2024 · 2 comments · Fixed by #11559
Assignees
Labels
bug Something isn't working

Comments

@2010YOUY01
Copy link
Contributor

Describe the bug

Reproducer in datafusion-cli:

DataFusion CLI v40.0.0
> create table t1(v1 int);

0 row(s) fetched.
Elapsed 0.073 seconds.

> SELECT * FROM t1 ORDER BY ACOS(SIN(v1));
thread 'main' panicked at /Users/yongting/Desktop/code/my_datafusion/arrow-datafusion/datafusion/common/src/scalar/mod.rs:1089:9:
assertion failed: datatype.is_primitive()
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 Jul 19, 2024
@2010YOUY01
Copy link
Contributor Author

All below queries will panic similarly

SELECT * FROM t1 ORDER BY ACOS(SIN(v1));
SELECT * FROM t1 ORDER BY ACOSH(SIN(v1));
SELECT * FROM t1 ORDER BY ASIN(SIN(v1));
SELECT * FROM t1 ORDER BY ATANH(SIN(v1));

@tshauck
Copy link
Contributor

tshauck commented Jul 20, 2024

take

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants