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)
----
---