Skip to content

Projection pushdown removes unqualified column names even when they are used #617

@alamb

Description

@alamb

Describe the bug

Problem:

I have a (user defined node) that looks like

ExtensionNode (expr uses col1, col2, col3) --> outputs new_col
  TableScan t1 of (col1, col2, col3)

Prior to #55 this worked

After that PR the projection pushdown logic decides that since the col1, col2 and col3 references don't have the table qualifier t1 on them, they are removed and the optimized plan looks like

ExtensionNode (expr uses col1, col2, col3) --> outputs new_col
  TableScan t1 of (col1)

Which then has issues because it expects col2 and col3 to be present but they have been "optimized" out

Expected behavior
The table scan should include col2 and col3 (they should not be optimized out), in addition to col1

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