Skip to content

Make inline_table_scan optimize whole plan during first optimization stage. #5364

@jackwener

Description

@jackwener

Describe the bug
Due to TableScan may in the subquery. So when inline_table_scan is first rule, we can't optimize it in first optimization stage.

If first optimization stage push down projection into this scan, inline_table_scan will be useless to this scan.

such as

predicate
  subquery
    table_scan (notice this scan)
table_scan

inline_table_scan ->

predicate
  subquery
    table_scan (non-inlined)
table_scan (have inlined)

-> unnest subquery

join
  table_scan (non-inlined)
  table_scan (have inlined)

notice: if pushdown projection into table_scan (non-inlined)
this scan will can't be inlined.

To Reproduce

#5366 now fail in this problem.

Expected behavior

Additional context

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