You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Andrey Mashenkov (Jira)" <ji...@apache.org> on 2023/05/04 15:31:00 UTC

[jira] [Commented] (IGNITE-18688) Sql. Filter and Project are not merged to TableScan

    [ https://issues.apache.org/jira/browse/IGNITE-18688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17719397#comment-17719397 ] 

Andrey Mashenkov commented on IGNITE-18688:
-------------------------------------------

Assume, there is a plan 
{code:java}
Project<-Filter<-TableScan
{code}
The test expects that both Project and Filter will be merged with the TableScan, but the planner can't do that with the only rules ProjectScanMergeRule and FilterScanMergeRule.
This is how Volcano planner works in Calcite, it takes Project and apply all the rules in can, then do the same with Filter and so on... at last it will have a rel-subsets like 
{code:java}
Project<-[Filter, FilteredTableScan]<-TableScan
{code}
So, actually, it just merge filter with table. Because it will never back to rel-subset with the Project node, after rel-subset was marked as optimized and planner was switched to the rel-subset with Filter node.

Seems, the reason, why this test ever pass is the rule was applied twice.



> Sql. Filter and Project are not merged to TableScan
> ---------------------------------------------------
>
>                 Key: IGNITE-18688
>                 URL: https://issues.apache.org/jira/browse/IGNITE-18688
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>            Reporter: Konstantin Orlov
>            Assignee: Andrey Mashenkov
>            Priority: Major
>              Labels: ignite-3
>
> After IGNITE-18213 the test {{org.apache.ignite.internal.sql.engine.planner.ProjectFilterScanMergePlannerTest#testFilterProjectFilterMerge}} start to fail. Need to investigate and fix the problem.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)