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

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

GitHub user sureshsubbiah opened a pull request:

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

    [TRAFODION-2758] Sort operator that uses TopN sort at runtime is not …

    …accurately determined at compile time
    
    This commit includes fixes for these three issues. Please see JIRA for a 
description of each fix.
    
    [TRAFODION-2758] Sort operator that uses TopN sort at runtime is not 
accurately determined at compile time
    [TRAFODION-2759] Use of rowset with large memory leads to various errors at 
runtime
    [TRAFODION-2760] hbase cache blocks is OFF for broad table with narrow index
    
    [TRAFODION-2758]
    comexe/ComTdbSort.cpp
    comexe/ComTdbSort.h
    executor/ex_sort.cpp
    generator/GenExplain.cpp
    generator/GenPreCode.cpp
    generator/GenRelMisc.cpp
    optimizer/RelExpr.cpp
    [TRAFODION-2759]
    bin/SqlciErrors.txt
    generator/GenRelPackedRows.cpp
    sqlcomp/DefaultConstants.h
    sqlcomp/nadefaults.cpp
    [TRAFODION-2760]
    generator/GenRelScan.cpp

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

    $ git pull https://github.com/sureshsubbiah/incubator-trafodion misc2

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

    https://github.com/apache/incubator-trafodion/pull/1250.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 #1250
    
----
commit ab59ee768d51edfa80a0e258ca58c300273e658b
Author: Suresh Subbiah <[email protected]>
Date:   2017-09-30T03:36:52Z

    [TRAFODION-2758] Sort operator that uses TopN sort at runtime is not 
accurately determined at compile time
    
    This commit includes fixes for these three issues. Please see JIRA for a 
description of each fix.
    
    [TRAFODION-2758] Sort operator that uses TopN sort at runtime is not 
accurately determined at compile time
    [TRAFODION-2759] Use of rowset with large memory leads to various errors at 
runtime
    [TRAFODION-2760] hbase cache blocks is OFF for broad table with narrow index
    
    [TRAFODION-2758]
    comexe/ComTdbSort.cpp
    comexe/ComTdbSort.h
    executor/ex_sort.cpp
    generator/GenExplain.cpp
    generator/GenPreCode.cpp
    generator/GenRelMisc.cpp
    optimizer/RelExpr.cpp
    [TRAFODION-2759]
    bin/SqlciErrors.txt
    generator/GenRelPackedRows.cpp
    sqlcomp/DefaultConstants.h
    sqlcomp/nadefaults.cpp
    [TRAFODION-2760]
    generator/GenRelScan.cpp

----


> Sort operator that uses TopN sort at runtime is not accurately determined at 
> compile time
> -----------------------------------------------------------------------------------------
>
>                 Key: TRAFODION-2758
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2758
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-cmp
>    Affects Versions: 2.2-incubating
>            Reporter: Suresh Subbiah
>            Assignee: Suresh Subbiah
>            Priority: Minor
>
> When a query has FIRST N  clause along with an ORDER BY, the resultannt Sort 
> operator is enable to do TopN optimization. The compiler needs to be aware of 
> this so that memory can be shared appropriately between all big memory 
> operators in the query. There are some flaws in the logic the compiler is 
> using to determine if a sort is TopN enabled. Currently the compiler thinks 
> all sort operators in the FirstN query are TopN enabled. This is incorrect, 
> only the first Sort, when traversing the query tree downwards from FirstN 
> will be enabled for this optimization, and that too with certain restrictions.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to