-
Notifications
You must be signed in to change notification settings - Fork 609
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(analysis): remove
pushdown_aggregation_filters()
- Loading branch information
Showing
5 changed files
with
37 additions
and
66 deletions.
There are no files selected for viewing
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
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
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
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
25 changes: 11 additions & 14 deletions
25
ibis/tests/sql/snapshots/test_select_sql/test_filter_self_join_analysis_bug/result.sql
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,19 +1,16 @@ | ||
WITH t0 AS ( | ||
SELECT t3.`region`, t3.`kind`, sum(t3.`amount`) AS `total` | ||
FROM purchases t3 | ||
SELECT t2.`region`, t2.`kind`, sum(t2.`amount`) AS `total` | ||
FROM purchases t2 | ||
WHERE t2.`kind` = 'bar' | ||
GROUP BY 1, 2 | ||
), | ||
t1 AS ( | ||
SELECT t0.* | ||
FROM t0 | ||
WHERE t0.`kind` = 'bar' | ||
), | ||
t2 AS ( | ||
SELECT t0.* | ||
FROM t0 | ||
WHERE t0.`kind` = 'foo' | ||
SELECT t2.`region`, t2.`kind`, sum(t2.`amount`) AS `total` | ||
FROM purchases t2 | ||
WHERE t2.`kind` = 'foo' | ||
GROUP BY 1, 2 | ||
) | ||
SELECT t2.`region`, t2.`total` - t1.`total` AS `diff` | ||
FROM t2 | ||
INNER JOIN t1 | ||
ON t2.`region` = t1.`region` | ||
SELECT t1.`region`, t1.`total` - t0.`total` AS `diff` | ||
FROM t1 | ||
INNER JOIN t0 | ||
ON t1.`region` = t0.`region` |