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