Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
LogicalFilter(condition=[>($5, 2)])
LogicalTableScan(table=[[default, userAttributes]])Describes the aggregate relation operator in the multi-stage query engine.
SELECT
/*+ aggOptions(num_groups_limit='10000000') */
col1, count(*)
FROM table GROUP BY col1SELECT
/*+ aggOptions(is_partitioned_by_group_by_keys='true') */
a.col3, a.col1, SUM(b.col3)
FROM a JOIN b ON a.col3 = b.col3
GROUP BY a.col3, a.col1SELECT
/*+ aggOptions(is_skip_leaf_stage_group_by='true') */
a.col1, SUM(a.col3)
FROM a
WHERE a.col3 >= 0 AND a.col2 = 'a'
GROUP BY a.col1SELECT
/*+ aggOptions(max_initial_result_holder_capacity='10') */
a.col1, SUM(a.col3)
FROM a
WHERE a.col3 >= 0 AND a.col2 = 'a'
GROUP BY a.col1LogicalAggregate(group=[{6}], agg#0=[COUNT()], agg#1=[MAX($5)])
LogicalTableScan(table=[[default, userAttributes]])LogicalAggregate(group=[{6}], agg#0=[COUNT()], agg#1=[MAX($5)])
LogicalTableScan(table=[[default, userAttributes]])SELECT
/*+ windowOptions(option1='value1', option2='value2') */
col1, SUM(intCol) OVER() as sum FROM tableLogicalProject(userUUID=[$6], deviceOS=[$4], EXPR$2=[SUBSTRING($4, 0, 2)])
LogicalTableScan(table=[[default, userAttributes]])Describes the union relation operator in the multi-stage query engine.
INTERSECTALLUNIONHashSet<Row> rightRows = new HashSet<>();
Block rightBlock = rightInput.nextBlock();
while (rightBlock is not EOS) {
rightRows.addAll(rightBlock.getRows());
rightBlock = rightInput.nextBlock();
}
Block leftBlock = leftInput.nextBlock();
while (leftBlock is not EOS) {
Block partialResultBlock = new Block();
for (Row row : leftBlock.getRows()) {
if (rightRows.add(row)) {
partialResultBlock.add(row);
}
}
emit partialResultBlock;
leftBlock = leftInput.nextBlock();
}
emit EOSselect userUUID
from (select userUUID from userAttributes)
UNION ALL
(select userUUID from userGroups)LogicalUnion(all=[true])
PinotLogicalExchange(distribution=[hash[0]])
LogicalProject(userUUID=[$6])
LogicalTableScan(table=[[default, userAttributes]])
PinotLogicalExchange(distribution=[hash[0]])
LogicalProject(userUUID=[$4])
LogicalTableScan(table=[[default, userGroups]])explain plan for
select userUUID
from (select userUUID from userAttributes)
UNION -- without ALL!
(select userUUID from userGroups)LogicalAggregate(group=[{0}])
PinotLogicalExchange(distribution=[hash[0]])
LogicalAggregate(group=[{0}])
LogicalUnion(all=[true])
PinotLogicalExchange(distribution=[hash[0]])
LogicalProject(userUUID=[$6])
LogicalTableScan(table=[[default, userAttributes]])
PinotLogicalExchange(distribution=[hash[0]])
LogicalProject(userUUID=[$4])
LogicalTableScan(table=[[default, userGroups]])Describes the hash join relation operator in the multi-stage query engine.
broadcast means there are multiple instances of the stream, and all records appear in each instance. This is the most expensive distribution, as it requires sending all the data to all the workers.PinotLogicalExchange(distribution=[hash[0, 1]])
LogicalProject(groupUUID=[$3], userUUID=[$4])
LogicalTableScan(table=[[default, userGroups]])LogicalJoin(condition=[=($0, $1)], joinType=[inner])
PinotLogicalExchange(distribution=[hash[0]])
LogicalProject(userUUID=[$6])
LogicalTableScan(table=[[default, userAttributes]])
PinotLogicalExchange(distribution=[hash[0]])
LogicalProject(userUUID=[$4])
LogicalTableScan(table=[[default, userGroups]])select largeTable.col1, smallTable.col2
from largeTable
cross join smallTableselect largeTable.col1, smallTable.col2
from smallTable
cross join largeTableDescribes the leaf operator in the multi-stage query engine.
Describes the intersect relation operator in the multi-stage query engine.
HashSet<Row> rightRows = new HashSet<>();
Block rightBlock = rightInput.nextBlock();
while (rightBlock is not EOS) {
rightRows.addAll(rightBlock.getRows());
rightBlock = rightInput.nextBlock();
}
Block leftBlock = leftInput.nextBlock();
while (leftBlock is not EOS) {
Block partialResultBlock = new Block();
for (Row row : leftBlock.getRows()) {
if (rightRows.remove(row)) {
partialResultBlock.add(row);
}
}
emit partialResultBlock;
leftBlock = leftInput.nextBlock();
}
emit EOSLogicalSort(sort0=[$0], sort1=[$2], dir0=[ASC], dir1=[ASC], fetch=[10])
LogicalProject(userUUID=[$6], deviceOS=[$4], EXPR$2=[SUBSTRING($4, 0, 2)])
LogicalTableScan(table=[[default, userAttributes]])select
a.*
from userAttributes as a
join userGroups as g
on a.userUUID = g.userUUID
where a.deviceOS = 'windows'LogicalProject(daysSinceFirstTrip=[$0], deviceOS=[$1], totalTrips=[$2], userUUID=[$3])
LogicalJoin(condition=[=($3, $4)], joinType=[inner])
PinotLogicalExchange(distribution=[hash[3]])
LogicalProject(daysSinceFirstTrip=[$3], deviceOS=[$4], totalTrips=[$5], userUUID=[$6])
LogicalFilter(condition=[=($4, _UTF-8'windows')])
LogicalTableScan(table=[[default, userAttributes]])
PinotLogicalExchange(distribution=[hash[0]])
LogicalProject(userUUID=[$4])
LogicalTableScan(table=[[default, userGroups]])select
a.*
from (select * from userAttributes limit 10) as a
join userGroups as g
on a.userUUID = g.userUUID
where a.deviceOS = 'windows'LogicalProject(daysSinceFirstTrip=[$0], deviceOS=[$1], totalTrips=[$2], userUUID=[$3])
LogicalJoin(condition=[=($3, $4)], joinType=[inner])
PinotLogicalExchange(distribution=[hash[3]])
LogicalFilter(condition=[=($1, _UTF-8'windows')])
LogicalSort(offset=[0], fetch=[10])
PinotLogicalSortExchange(distribution=[hash], collation=[[]], isSortOnSender=[false], isSortOnReceiver=[false])
LogicalSort(fetch=[10])
LogicalProject(daysSinceFirstTrip=[$3], deviceOS=[$4], totalTrips=[$5], userUUID=[$6])
LogicalTableScan(table=[[default, userAttributes]])
PinotLogicalExchange(distribution=[hash[0]])
LogicalProject(userUUID=[$4])
LogicalTableScan(table=[[default, userGroups]])select
a.*
from (select * from userAttributes where deviceOS = 'windows' limit 10) as a
join userGroups as g
on a.userUUID = g.userUUIDLogicalProject(daysSinceFirstTrip=[$0], deviceOS=[$1], totalTrips=[$2], userUUID=[$3])
LogicalJoin(condition=[=($3, $4)], joinType=[inner])
PinotLogicalExchange(distribution=[hash[3]])
LogicalSort(offset=[0], fetch=[10])
PinotLogicalSortExchange(distribution=[hash], collation=[[]], isSortOnSender=[false], isSortOnReceiver=[false])
LogicalSort(fetch=[10])
LogicalProject(daysSinceFirstTrip=[$3], deviceOS=[$4], totalTrips=[$5], userUUID=[$6])
LogicalFilter(condition=[=($4, _UTF-8'windows')])
LogicalTableScan(table=[[default, userAttributes]])
PinotLogicalExchange(distribution=[hash[0]])
LogicalProject(userUUID=[$4])
LogicalTableScan(table=[[default, userGroups]])