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

ASF GitHub Bot commented on TRAFODION-2616:
-------------------------------------------

GitHub user zellerh opened a pull request:

    https://github.com/apache/incubator-trafodion/pull/1104

    [TRAFODION-2616] Nested join regression after fix for TRAFODION-2569

    When pushing predicates into a scan node, it is not ok to copy the
    index info of the original scan to the new scan node, since the
    additional predicates may change the set of qualifying indexes.
    
    Also, the method to copy the index info needs to copy the set of
    computed predicates, since these are computed in the addIndexInfo()
    method.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zellerh/incubator-trafodion bug/cses_jan-17

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-trafodion/pull/1104.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1104
    
----
commit 84abd5c8c1821d4fb85c0f2ecdd68a46e1e2e58f
Author: Hans Zeller <[email protected]>
Date:   2017-05-30T15:49:36Z

    [TRAFODION-2616] Nested join regression after fix for TRAFODION-2569
    
    When pushing predicates into a scan node, it is not ok to copy the
    index info of the original scan to the new scan node, since the
    additional predicates may change the set of qualifying indexes.
    
    Also, the method to copy the index info needs to copy the set of
    computed predicates, since these are computed in the addIndexInfo()
    method.

----


> Nested join regression after fix for TRAFODION-2569
> ---------------------------------------------------
>
>                 Key: TRAFODION-2616
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2616
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-cmp
>    Affects Versions: 2.2-incubating
>            Reporter: Hans Zeller
>            Assignee: Hans Zeller
>             Fix For: 2.2-incubating
>
>
> The fix for TRAFODION-2569 caused a regression with nested joins on salted 
> tables: If the salted table ends up as the inner table of a join, we omit 
> computed predicates on the salt column. A similar problem where the join 
> predicate is missing from the key can also happen to any table, salted or  
> non-salted.
> The problem happened when I removed the call to removeIndexInfo in file 
> memo.cpp. The FilterRule0 code called Scan::copyIndexInfo(), which is not 
> correct when pushing predicates into a scan node, because additional indexes 
> could become interesting.
> The "kludge" in memo.cpp compensated for this by calling removeIndexInfo(), 
> then calling addIndexInfo(). A better way is probably to call addIndexInfo() 
> in the first place in the filter rule.
> Also, method copyIndexInfo should copy the computed predicates, since the 
> only place where they are computed is in addIndexInfo().
> I probably still won't be able to remove the "kludge" in memo.cpp.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to