forked from prestodb/presto
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid planning unnecessary LIMIT/TopN/Sort/DistinctLimit when relatio…
…n is know to single row or less rows than requested Cherry-pick of trinodb/trino#441 Co-authored-by: praveenkrishna <praveenkrishna@tutanota.com>
- Loading branch information
1 parent
4d5afce
commit ccf42a8
Showing
27 changed files
with
1,247 additions
and
463 deletions.
There are no files selected for viewing
95 changes: 47 additions & 48 deletions
95
presto-benchto-benchmarks/src/test/resources/sql/presto/tpcds/q05.plan.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,56 @@ | ||
local exchange (GATHER, SINGLE, []) | ||
remote exchange (GATHER, SINGLE, []) | ||
final aggregation over (channel$gid, groupid, id$gid) | ||
local exchange (REPARTITION, HASH, [channel$gid, groupid, id$gid]) | ||
remote exchange (REPARTITION, HASH, [channel$gid, groupid, id$gid]) | ||
partial aggregation over (channel$gid, groupid, id$gid) | ||
local exchange (REPARTITION, ROUND_ROBIN, []) | ||
final aggregation over (s_store_id) | ||
local exchange (GATHER, SINGLE, []) | ||
remote exchange (REPARTITION, HASH, [s_store_id]) | ||
partial aggregation over (s_store_id) | ||
remote exchange (GATHER, SINGLE, []) | ||
final aggregation over (channel$gid, groupid, id$gid) | ||
local exchange (REPARTITION, HASH, [channel$gid, groupid, id$gid]) | ||
remote exchange (REPARTITION, HASH, [channel$gid, groupid, id$gid]) | ||
partial aggregation over (channel$gid, groupid, id$gid) | ||
local exchange (REPARTITION, ROUND_ROBIN, []) | ||
final aggregation over (s_store_id) | ||
local exchange (GATHER, SINGLE, []) | ||
remote exchange (REPARTITION, HASH, [s_store_id]) | ||
partial aggregation over (s_store_id) | ||
join (INNER, REPLICATED): | ||
join (INNER, REPLICATED): | ||
join (INNER, REPLICATED): | ||
remote exchange (REPARTITION, ROUND_ROBIN, []) | ||
scan store_sales | ||
scan store_returns | ||
local exchange (GATHER, SINGLE, []) | ||
remote exchange (REPLICATE, BROADCAST, []) | ||
scan date_dim | ||
remote exchange (REPARTITION, ROUND_ROBIN, []) | ||
scan store_sales | ||
scan store_returns | ||
local exchange (GATHER, SINGLE, []) | ||
remote exchange (REPLICATE, BROADCAST, []) | ||
scan store | ||
final aggregation over (cp_catalog_page_id) | ||
local exchange (GATHER, SINGLE, []) | ||
remote exchange (REPARTITION, HASH, [cp_catalog_page_id]) | ||
partial aggregation over (cp_catalog_page_id) | ||
scan date_dim | ||
local exchange (GATHER, SINGLE, []) | ||
remote exchange (REPLICATE, BROADCAST, []) | ||
scan store | ||
final aggregation over (cp_catalog_page_id) | ||
local exchange (GATHER, SINGLE, []) | ||
remote exchange (REPARTITION, HASH, [cp_catalog_page_id]) | ||
partial aggregation over (cp_catalog_page_id) | ||
join (INNER, REPLICATED): | ||
join (INNER, REPLICATED): | ||
join (INNER, REPLICATED): | ||
remote exchange (REPARTITION, ROUND_ROBIN, []) | ||
scan catalog_sales | ||
scan catalog_returns | ||
local exchange (GATHER, SINGLE, []) | ||
remote exchange (REPLICATE, BROADCAST, []) | ||
scan date_dim | ||
remote exchange (REPARTITION, ROUND_ROBIN, []) | ||
scan catalog_sales | ||
scan catalog_returns | ||
local exchange (GATHER, SINGLE, []) | ||
remote exchange (REPLICATE, BROADCAST, []) | ||
scan catalog_page | ||
final aggregation over (web_site_id) | ||
local exchange (GATHER, SINGLE, []) | ||
remote exchange (REPARTITION, HASH, [web_site_id]) | ||
partial aggregation over (web_site_id) | ||
scan date_dim | ||
local exchange (GATHER, SINGLE, []) | ||
remote exchange (REPLICATE, BROADCAST, []) | ||
scan catalog_page | ||
final aggregation over (web_site_id) | ||
local exchange (GATHER, SINGLE, []) | ||
remote exchange (REPARTITION, HASH, [web_site_id]) | ||
partial aggregation over (web_site_id) | ||
join (INNER, REPLICATED): | ||
join (INNER, REPLICATED): | ||
join (INNER, REPLICATED): | ||
remote exchange (REPARTITION, ROUND_ROBIN, []) | ||
scan web_sales | ||
join (RIGHT, PARTITIONED): | ||
remote exchange (REPARTITION, HASH, [ws_item_sk_216, ws_order_number_230]) | ||
scan web_sales | ||
local exchange (GATHER, SINGLE, []) | ||
remote exchange (REPARTITION, HASH, [wr_item_sk, wr_order_number]) | ||
scan web_returns | ||
local exchange (GATHER, SINGLE, []) | ||
remote exchange (REPLICATE, BROADCAST, []) | ||
scan date_dim | ||
remote exchange (REPARTITION, ROUND_ROBIN, []) | ||
scan web_sales | ||
join (RIGHT, PARTITIONED): | ||
remote exchange (REPARTITION, HASH, [ws_item_sk_216, ws_order_number_230]) | ||
scan web_sales | ||
local exchange (GATHER, SINGLE, []) | ||
remote exchange (REPARTITION, HASH, [wr_item_sk, wr_order_number]) | ||
scan web_returns | ||
local exchange (GATHER, SINGLE, []) | ||
remote exchange (REPLICATE, BROADCAST, []) | ||
scan web_site | ||
scan date_dim | ||
local exchange (GATHER, SINGLE, []) | ||
remote exchange (REPLICATE, BROADCAST, []) | ||
scan web_site |
Oops, something went wrong.