Skip to content

ScalarSubquery to Join failed #6326

@jackwener

Description

@jackwener

Describe the bug

This feature is not implemented: Physical plan does not support logical expression (<subquery>)

ScalarSubquery to Join failed

explain select c1 from t1 where t1.c2 > (select t2.c2 from t2);
+--------------+---------------------------------------+
| plan_type    | plan                                  |
+--------------+---------------------------------------+
| logical_plan | Projection: t1.c1                     |
|              |   Filter: t1.c2 > (<subquery>)        |
|              |     Subquery:                         |
|              |       Projection: t2.c2               |
|              |         TableScan: t2                 |
|              |     TableScan: t1 projection=[c1, c2] |
+--------------+---------------------------------------+

To Reproduce

CREATE TABLE IF NOT EXISTS t1(c1 INT, c2 VARCHAR) AS VALUES(1,'HELLO'),(12,'DATAFUSION');
CREATE TABLE IF NOT EXISTS t2(c1 INT, c2 VARCHAR) AS VALUES(1,'HELLO'),(12,'DATAFUSION');

select c1 from t1 where t1.c2 > (select t2.c2 from t2);

Expected behavior

No response

Additional context

No response

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