-
Notifications
You must be signed in to change notification settings - Fork 8.3k
JOIN ... GROUP BY ... WITH TOTALS throwing exception on join #9839
Copy link
Copy link
Closed
Labels
backward compatibilitybugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasecomp-joinsJOINs end-to-end (planning hooks + runtime join operators/algorithms). Single bucket to avoid pla...JOINs end-to-end (planning hooks + runtime join operators/algorithms). Single bucket to avoid pla...
Description
Following query (minute the aliases on the sub-queries) worked fine in 19.x (previous to requiring the ll and rr labels).
SELECT
id, yago, recent
FROM (
SELECT under_item_id AS id, SUM(price_sold) AS recent
FROM by_item WHERE (date BETWEEN '2019-12-16' AND '2020-03-08')
GROUP BY id WITH TOTALS
) ll
FULL OUTER JOIN
(
SELECT under_item_id AS id, SUM(price_sold) AS yago
FROM by_item WHERE (date BETWEEN '2018-12-17' AND '2019-03-10')
GROUP BY id WITH TOTALS
) rr
USING (id)
Now, in 20.3.4.10 it is throwing:
Code: 10. DB::Exception: Received from localhost:9000. DB::Exception: Not found column rr.id in block. There are only columns: id, yago.
If you remove the WITH TOTALS, it works. Seemingly getting confused with the combination of the gouped totals with the labels added?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
backward compatibilitybugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasecomp-joinsJOINs end-to-end (planning hooks + runtime join operators/algorithms). Single bucket to avoid pla...JOINs end-to-end (planning hooks + runtime join operators/algorithms). Single bucket to avoid pla...