Multi-stage intersect ignores all
modifier
#13126
Labels
beginner-task
Small task for new contributors to ramp up
multi-stage
Related to the multi-stage query engine
In SQL intersect may be modified with the
all
modifier. For example:if table A contains a column a with values
[1,1,2,3,4]
and B contains a column b with values[1, 1, 2]
:Returns
[1, 2]
whilereturns
[1,1,2]
.Currently Pinot accepts the
ALL
modifier and it is shown in the explain plan, but the semantics are always the same. Specifically, Pinot semantics are the ones of intersect without all modifier.You can verify that by running
ColocatedJoinEngineQuickStart
and executing:with and without all.
intersect all should return the same number of rows than
count()
(which is2494
) while intersect should return the same number of rows thancount(distinct(userUUID))
(which is2470
).But the returned number of rows is
2470
with and without all modifierAs a short term solution we can fail if all modifier is supplied, as it would be better than returning incorrect results.
The text was updated successfully, but these errors were encountered: