Skip to content

Crash bug when log() is used in order by clause (SQLancer) #11549

Description

@2010YOUY01

Describe the bug

Reproducer in datafusion-cli

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

0 row(s) fetched.
Elapsed 0.065 seconds.

> select * from t3 order by log(v1);
thread 'main' panicked at /Users/yongting/Desktop/code/my_datafusion/arrow-datafusion/datafusion/functions/src/math/log.rs:85:42:
index out of bounds: the len is 1 but the index is 1
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

It is likely this bug is only related to log function implementation. Perhaps it could be a good first issue.

To Reproduce

No response

Expected behavior

No response

Additional context

Found by SQLancer #11030

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions