Skip to content

Filter / where clause without column names is removed in optimization pass #220

Description

@Dandandan

Describe the bug

To Reproduce
CREATE EXTERNAL TABLE csv (price INT)
STORED AS CSV
LOCATION './tests/example.csv';

./tests/example.csv:

1
2
3
CREATE EXTERNAL TABLE example (price INT) 
STORED AS CSV
LOCATION './tests/example.csv';
> select * from example where 1=2 ;
+-------+
| price |
+-------+
| 1     |
| 2     |
| 3     |
+-------+

Expected behavior
Should return an empty result set. When inspecting the optimized plan, the filter clause is removed (without changing the rest of the plan).

Additional context
The problem goes away when removing FilterPushDown so this is likely the offender

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