[
https://issues.apache.org/jira/browse/DRILL-6615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pritesh Maker updated DRILL-6615:
---------------------------------
Fix Version/s: (was: 1.15.0)
1.16.0
> To prevent the limit operator after topN operator if there is a single
> fragment
> -------------------------------------------------------------------------------
>
> Key: DRILL-6615
> URL: https://issues.apache.org/jira/browse/DRILL-6615
> Project: Apache Drill
> Issue Type: Improvement
> Affects Versions: 1.14.0
> Reporter: Kedar Sankar Behera
> Assignee: Sorabh Hamirwasia
> Priority: Major
> Fix For: 1.16.0
>
> Attachments: topnNlimit.pdf
>
>
> The limit operator is called after topN operator which is not needed if u
> have only 1 fragment .
> For eg :-
> {code}
> 00-00 Screen : rowType = RecordType(ANY c_custkey, ANY c_name, ANY EXPR$2,
> ANY EXPR$3): rowcount = 50.0, cumulative cost = \{116621.0 rows,
> 2787624.201857771 cpu, 0.0 io, 0.0 network, 0.0 memory}, id = 7854 00-01
> Project(c_custkey=[$0], c_name=[$1], EXPR$2=[$2], EXPR$3=[$3]) : rowType =
> RecordType(ANY c_custkey, ANY c_name, ANY EXPR$2, ANY EXPR$3): rowcount =
> 50.0, cumulative cost = \{116616.0 rows, 2787619.201857771 cpu, 0.0 io, 0.0
> network, 0.0 memory}, id = 7853 00-02 SelectionVectorRemover : rowType =
> RecordType(ANY c_custkey, ANY c_name, ANY ITEM, ANY ITEM1): rowcount = 50.0,
> cumulative cost = \{116566.0 rows, 2787419.201857771 cpu, 0.0 io, 0.0
> network, 0.0 memory}, id = 7852 00-03 Limit(fetch=[50]) : rowType =
> RecordType(ANY c_custkey, ANY c_name, ANY ITEM, ANY ITEM1): rowcount = 50.0,
> cumulative cost = \{116516.0 rows, 2787369.201857771 cpu, 0.0 io, 0.0
> network, 0.0 memory}, id = 7851 00-04 SelectionVectorRemover : rowType =
> RecordType(ANY c_custkey, ANY c_name, ANY ITEM, ANY ITEM1): rowcount =
> 29116.0, cumulative cost = \{116466.0 rows, 2787169.201857771 cpu, 0.0 io,
> 0.0 network, 0.0 memory}, id = 7850 00-05 TopN(limit=[50]) : rowType =
> RecordType(ANY c_custkey, ANY c_name, ANY ITEM, ANY ITEM1): rowcount =
> 29116.0, cumulative cost = \{87350.0 rows, 2758053.201857771 cpu, 0.0 io, 0.0
> network, 0.0 memory}, id = 7849 00-06 LateralJoin(correlation=[$cor2],
> joinType=[inner], requiredColumns=[\{0}], column excluded from output:
> =[`c_orders`]) : rowType = RecordType(ANY c_custkey, ANY c_name, ANY ITEM,
> ANY ITEM1): rowcount = 29116.0, cumulative cost = \{58234.0 rows, 786135.0
> cpu, 0.0 io, 0.0 network, 0.0 memory}, id = 7848 00-08
> Scan(groupscan=[EasyGroupScan
> [selectionRoot=maprfs:/drill/testdata/lateralUnnest/sf0dot01/json/customer,
> numFiles=1, columns=[`c_orders`, `c_custkey`, `c_name`],
> files=[maprfs:///drill/testdata/lateralUnnest/sf0dot01/json/customer/customer.json]]])
> : rowType = RecordType(ANY c_orders, ANY c_custkey, ANY c_name): rowcount =
> 29116.0, cumulative cost = \{29116.0 rows, 87348.0 cpu, 0.0 io, 0.0 network,
> 0.0 memory}, id = 7846 00-07 Project(ITEM=[ITEM($0, 'o_orderkey')],
> ITEM1=[ITEM($0, 'o_totalprice')]) : rowType = RecordType(ANY ITEM, ANY
> ITEM1): rowcount = 1.0, cumulative cost = \{2.0 rows, 3.0 cpu, 0.0 io, 0.0
> network, 0.0 memory}, id = 7847 00-09 Unnest [srcOp=00-06] : rowType =
> RecordType(ANY c_orders): rowcount = 1.0, cumulative cost = \{1.0 rows, 1.0
> cpu, 0.0 io, 0.0 network, 0.0 memory}, id = 7700
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)