You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Ignite TC Bot (Jira)" <ji...@apache.org> on 2022/05/01 09:38:00 UTC

[jira] [Commented] (IGNITE-16919) H2 Index cost function must take into account only corresponding columns.

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

Ignite TC Bot commented on IGNITE-16919:
----------------------------------------

{panel:title=Branch: [pull/10007/head] Base: [master] : No blockers found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}{panel}
{panel:title=Branch: [pull/10007/head] Base: [master] : No new tests found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1}{panel}
[TeamCity *--&gt; Run :: All* Results|https://ci.ignite.apache.org/viewLog.html?buildId=6551462&amp;buildTypeId=IgniteTests24Java8_RunAll]

> H2 Index cost function must take into account only corresponding columns.
> -------------------------------------------------------------------------
>
>                 Key: IGNITE-16919
>                 URL: https://issues.apache.org/jira/browse/IGNITE-16919
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 2.13
>            Reporter: Evgeny Stanilovsky
>            Assignee: Evgeny Stanilovsky
>            Priority: Major
>         Attachments: image-2022-04-30-19-13-59-997.png
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> H2IndexCostedBase#getCostRangeIndex is called with allColumnsSet where consists columns from all operating tables, check: 
> org.h2.table.Plan#calculateCost :
> {code:java}
>         final HashSet<Column> allColumnsSet = ExpressionVisitor
>                 .allColumnsForTableFilters(allFilters);
> {code}
> thus allColumnsSet consist columns from all operating tables
>  !image-2022-04-30-19-13-59-997.png! 
> and erroneous iteration here:
> H2IndexCostedBase#getCostRangeIndex
> ...
> {code:java}
> if (!isScanIndex && allColumnsSet != null && !skipColumnsIntersection && !allColumnsSet.isEmpty()) {
>             boolean foundAllColumnsWeNeed = true;
>             for (Column c : allColumnsSet) { // <-- all columns
> {code}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)