Skip to content

Commit

Permalink
refactor(api): remove unnecessary select from set operations (#9438)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud authored Jun 25, 2024
1 parent 196d8a1 commit 88a2785
Show file tree
Hide file tree
Showing 31 changed files with 269 additions and 408 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
SELECT
*
FROM (
SELECT
*
FROM `t0` AS `t0`
EXCEPT DISTINCT
SELECT
*
FROM `t1` AS `t1`
) AS `t2`
FROM `t0` AS `t0`
EXCEPT DISTINCT
SELECT
*
FROM `t1` AS `t1`
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
SELECT
*
FROM (
SELECT
*
FROM `t0` AS `t0`
INTERSECT DISTINCT
SELECT
*
FROM `t1` AS `t1`
) AS `t2`
FROM `t0` AS `t0`
INTERSECT DISTINCT
SELECT
*
FROM `t1` AS `t1`
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
SELECT
*
FROM (
SELECT
*
FROM `t0` AS `t0`
UNION ALL
SELECT
*
FROM `t1` AS `t1`
) AS `t2`
FROM `t0` AS `t0`
UNION ALL
SELECT
*
FROM `t1` AS `t1`
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
SELECT
*
FROM (
SELECT
*
FROM `t0` AS `t0`
UNION DISTINCT
SELECT
*
FROM `t1` AS `t1`
) AS `t2`
FROM `t0` AS `t0`
UNION DISTINCT
SELECT
*
FROM `t1` AS `t1`
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
SELECT
*
FROM (
SELECT
*
FROM `functional_alltypes` AS `t0`
UNION ALL
SELECT
*
FROM `functional_alltypes` AS `t0`
) AS `t1`
FROM `functional_alltypes` AS `t0`
UNION ALL
SELECT
*
FROM `functional_alltypes` AS `t0`
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
SELECT
*
FROM (
SELECT
*
FROM `functional_alltypes` AS `t0`
UNION DISTINCT
SELECT
*
FROM `functional_alltypes` AS `t0`
) AS `t1`
FROM `functional_alltypes` AS `t0`
UNION DISTINCT
SELECT
*
FROM `functional_alltypes` AS `t0`
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,13 @@ SELECT
FROM (
SELECT
*
FROM (
SELECT
*
FROM (
SELECT
*
FROM `t1` AS `t2`
UNION ALL
SELECT
*
FROM `t1` AS `t4`
) AS `t5`
) AS `t6`
FROM `t1` AS `t2`
UNION ALL
SELECT
*
FROM `t1` AS `t3`
) AS `t7`
FROM `t1` AS `t4`
) AS `t5`
UNION ALL
SELECT
*
FROM `t1` AS `t3`
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,13 @@ SELECT
FROM (
SELECT
*
FROM (
SELECT
*
FROM (
SELECT
*
FROM `t1` AS `t2`
UNION DISTINCT
SELECT
*
FROM `t1` AS `t4`
) AS `t5`
) AS `t6`
UNION ALL
FROM `t1` AS `t2`
UNION DISTINCT
SELECT
*
FROM `t1` AS `t3`
) AS `t7`
FROM `t1` AS `t4`
) AS `t5`
UNION ALL
SELECT
*
FROM `t1` AS `t3`
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,13 @@ SELECT
FROM (
SELECT
*
FROM (
SELECT
*
FROM (
SELECT
*
FROM `t1` AS `t2`
UNION ALL
SELECT
*
FROM `t1` AS `t4`
) AS `t5`
) AS `t6`
UNION DISTINCT
FROM `t1` AS `t2`
UNION ALL
SELECT
*
FROM `t1` AS `t3`
) AS `t7`
FROM `t1` AS `t4`
) AS `t5`
UNION DISTINCT
SELECT
*
FROM `t1` AS `t3`
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,13 @@ SELECT
FROM (
SELECT
*
FROM (
SELECT
*
FROM (
SELECT
*
FROM `t1` AS `t2`
UNION DISTINCT
SELECT
*
FROM `t1` AS `t4`
) AS `t5`
) AS `t6`
FROM `t1` AS `t2`
UNION DISTINCT
SELECT
*
FROM `t1` AS `t3`
) AS `t7`
FROM `t1` AS `t4`
) AS `t5`
UNION DISTINCT
SELECT
*
FROM `t1` AS `t3`
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,13 @@ SELECT
FROM (
SELECT
*
FROM (
SELECT
*
FROM (
SELECT
*
FROM "t1" AS "t2"
UNION ALL
SELECT
*
FROM "t1" AS "t4"
) AS "t5"
) AS "t6"
FROM "t1" AS "t2"
UNION ALL
SELECT
*
FROM "t1" AS "t3"
) AS "t7"
FROM "t1" AS "t4"
) AS "t5"
UNION ALL
SELECT
*
FROM "t1" AS "t3"
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,13 @@ SELECT
FROM (
SELECT
*
FROM (
SELECT
*
FROM (
SELECT
*
FROM "t1" AS "t2"
UNION
SELECT
*
FROM "t1" AS "t4"
) AS "t5"
) AS "t6"
FROM "t1" AS "t2"
UNION
SELECT
*
FROM "t1" AS "t3"
) AS "t7"
FROM "t1" AS "t4"
) AS "t5"
UNION
SELECT
*
FROM "t1" AS "t3"
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,13 @@ SELECT
FROM (
SELECT
*
FROM (
SELECT
*
FROM (
SELECT
*
FROM "t1" AS "t2"
UNION ALL
SELECT
*
FROM "t1" AS "t4"
) AS "t5"
) AS "t6"
FROM "t1" AS "t2"
UNION ALL
SELECT
*
FROM "t1" AS "t3"
) AS "t7"
FROM "t1" AS "t4"
) AS "t5"
UNION ALL
SELECT
*
FROM "t1" AS "t3"
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,13 @@ SELECT
FROM (
SELECT
*
FROM (
SELECT
*
FROM (
SELECT
*
FROM "t1" AS "t2"
UNION
SELECT
*
FROM "t1" AS "t4"
) AS "t5"
) AS "t6"
FROM "t1" AS "t2"
UNION
SELECT
*
FROM "t1" AS "t3"
) AS "t7"
FROM "t1" AS "t4"
) AS "t5"
UNION
SELECT
*
FROM "t1" AS "t3"
Loading

0 comments on commit 88a2785

Please sign in to comment.