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

ASF GitHub Bot commented on DRILL-6339:
---------------------------------------

GitHub user Ben-Zvi opened a pull request:

    https://github.com/apache/drill/pull/1219

    DRILL-6339: Add a new option to disable TopN (for testing)

    To allow simple testing of the External Sort operator (e.g., test 
spilling), we would like to use a query of the form: ".... ORDER BY ... LIMIT 
... "; however the current planner unconditionally selects the TopN operator 
for such a query.
       Solution: Introduce an internal option that can negate the planner's 
choice in this case. The implementation overrides the matches() method (default 
was returning true) in PushLimitToTopN , returning the new boolean option 
(default true) instead.
      (The last 'true' in SystemOptionManager makes this option 'internal'). 
This new option was tested manually.
    


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

    $ git pull https://github.com/Ben-Zvi/drill DRILL-6339

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

    https://github.com/apache/drill/pull/1219.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 #1219
    
----
commit 0c5bb6be7d62039dbd65e5fb06f949178bcd36eb
Author: Ben-Zvi <bben-zvi@...>
Date:   2018-04-18T00:05:50Z

    DRILL-6339: Add a new option to disable TopN (for testing)

----


> New option to disable TopN (for testing Sort)
> ---------------------------------------------
>
>                 Key: DRILL-6339
>                 URL: https://issues.apache.org/jira/browse/DRILL-6339
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Query Planning &amp; Optimization
>    Affects Versions: 1.13.0
>            Reporter: Boaz Ben-Zvi
>            Assignee: Boaz Ben-Zvi
>            Priority: Minor
>             Fix For: 1.14.0
>
>
>    When a query uses ... ORDER BY ... LIMIT ..., the planner unconditionally 
> picks the TopN operator to (efficiently) implement this order.  This 
> precludes an easy way to test the External Sort operator over a large dataset 
> (e.g., test spilling).
>    A new internal option to disable picking TopN (hence using the External 
> Sort instead) would be useful for various testings. (And may be in other 
> scenarios, like a bug found in the TopN).
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to