Skip to content

optimizer panic with certain query(count(count(x))/y) #17166

@discord9

Description

@discord9

Describe the bug

This bug involve user defined node as leaf node and a slightly complex query, which will panic with index out of bounds: the len is 2 but the index is 2 when trying to optimize this query.

this bug only appear in datafusion="45.0.0", later version(>= 46.0.0) doesn't appear to have this bug, however I fail to found related fixes to it in changelog of 46.0.0, so put it in here just in case it isn't fully fixed.

To Reproduce

Put lib.rs and Cargo.toml to a blank project and can reproduce this pnaic, backtrace also included

backtrace.log
lib.rs.txt
Cargo.toml.txt

Expected behavior

not panic

Additional context

If this bug is clearly fixed in later version, could anyone point me to the pr that fix this? And feel free to close this issue in that case

Metadata

Metadata

Assignees

No one assigned

    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