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

[jira] [Resolved] (IGNITE-13026) Calcite integration. Fix metadata for IgniteTable when it has embedded filters.

     [ https://issues.apache.org/jira/browse/IGNITE-13026?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Konstantin Orlov resolved IGNITE-13026.
---------------------------------------
    Resolution: Fixed

Looks like IGNITE-12715 fixes this issue

> Calcite integration. Fix metadata for IgniteTable when it has embedded filters.
> -------------------------------------------------------------------------------
>
>                 Key: IGNITE-13026
>                 URL: https://issues.apache.org/jira/browse/IGNITE-13026
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>            Reporter: Roman Kondakov
>            Assignee: Konstantin Orlov
>            Priority: Critical
>
> By default {{RelMdRowCount}} return the actual row count for {{IgniteTables}}. But current implementation of {{IgniteTableScan}} may contain embedded filters and rows that are filtered out by these filters are not taken into account by the metadata subsystem. 
>  For example, table emps contains 1000 rows. Filter name='Vasya' filters out 95% of rows. For now we end up with situation
> {code:java}
> IgniteFilter(name='Vasya') <- estimated cardinality = 50 rows 
>   IgniteTableScan(filters=null) <- estimated cardinality = 1000 rows.
> {code}
> but after merging {{Filter}} into {{Scan}} we get the wrong estimation
> {code:java}
> IgniteTableScan(filters={name='Vasya'}) <- estimated cardinality = 1000 rows. But should be 50 rows.
> {code}
> We need to add a special case in order to compute the actual cardinality returned by {{IgniteTableScan}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)