Skip to content

decorrelate_where_in doesn't support Sort/Limit in Subquery. #6263

Description

@jackwener

Describe the bug

when set_bool("datafusion.optimizer.skip_failed_rules", false), we can see test support_limit_subquery fail in subqueries will fail.

To Reproduce

CREATE TABLE IF NOT EXISTS t1(a int not null, b varchar not null)  AS VALUES(1,'HELLO'),(12,'DATAFUSION');
CREATE TABLE IF NOT EXISTS t2(a int not null, b varchar not null)  AS VALUES(1,'HELLO'),(12,'DATAFUSION');
select t1.a, t1.b from t1 where t1.a in (select t2.a from t2 where t1.b = t2.b limit 100);

Expected behavior

No response

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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