2019-03-05 15:16:59 +00:00
|
|
|
0 0
|
2021-02-19 14:06:57 +00:00
|
|
|
--- cross ---
|
2019-02-01 16:48:25 +00:00
|
|
|
1 1 1 1
|
2019-02-04 18:45:31 +00:00
|
|
|
1 1 1 2
|
|
|
|
2 2 2 \N
|
2021-02-19 14:06:57 +00:00
|
|
|
--- cross nullable ---
|
2019-02-01 16:48:25 +00:00
|
|
|
1 1 1 1
|
2019-02-04 18:45:31 +00:00
|
|
|
2 2 1 2
|
2021-02-19 14:06:57 +00:00
|
|
|
--- cross nullable vs not nullable ---
|
2019-02-01 16:48:25 +00:00
|
|
|
1 1 1 1
|
2019-02-04 18:45:31 +00:00
|
|
|
2 2 1 2
|
2021-02-19 14:06:57 +00:00
|
|
|
--- cross self ---
|
2019-02-04 18:45:31 +00:00
|
|
|
1 1 1 1
|
|
|
|
2 2 2 2
|
2021-02-19 14:06:57 +00:00
|
|
|
--- cross one table expr ---
|
2019-02-04 18:45:31 +00:00
|
|
|
1 1 1 1
|
|
|
|
1 1 1 2
|
|
|
|
1 1 2 \N
|
|
|
|
1 1 3 \N
|
|
|
|
2 2 1 1
|
|
|
|
2 2 1 2
|
2019-02-01 16:48:25 +00:00
|
|
|
2 2 2 \N
|
2019-02-04 18:45:31 +00:00
|
|
|
2 2 3 \N
|
2021-02-19 14:06:57 +00:00
|
|
|
--- cross multiple ands ---
|
2019-02-04 18:45:31 +00:00
|
|
|
1 1 1 1
|
2021-02-19 14:06:57 +00:00
|
|
|
--- cross and inside and ---
|
2019-02-04 18:45:31 +00:00
|
|
|
1 1 1 1
|
2021-02-19 14:06:57 +00:00
|
|
|
--- cross split conjunction ---
|
2019-02-01 16:48:25 +00:00
|
|
|
1 1 1 1
|
2021-02-19 14:06:57 +00:00
|
|
|
--- and or ---
|
|
|
|
1 1 1 1
|
|
|
|
--- arithmetic expr ---
|
|
|
|
2 2 1 2
|
|
|
|
--- is null or ---
|
|
|
|
1 1 1 2
|
|
|
|
2 2 2 \N
|
|
|
|
--- do not rewrite alias ---
|
|
|
|
1
|
|
|
|
1
|
|
|
|
2
|
|
|
|
--- comma ---
|
2019-02-01 17:22:28 +00:00
|
|
|
1 1 1 1
|
2019-02-04 18:45:31 +00:00
|
|
|
1 1 1 2
|
2019-02-01 17:22:28 +00:00
|
|
|
2 2 2 \N
|
2021-02-19 14:06:57 +00:00
|
|
|
--- comma nullable ---
|
2019-02-01 17:22:28 +00:00
|
|
|
1 1 1 1
|
2019-02-04 18:45:31 +00:00
|
|
|
2 2 1 2
|
2021-02-19 14:06:57 +00:00
|
|
|
--- comma and or ---
|
|
|
|
1 1 1 1
|
|
|
|
2 2 2 \N
|
|
|
|
--- cross ---
|
2020-09-08 20:05:47 +00:00
|
|
|
SELECT
|
2020-06-22 14:37:42 +00:00
|
|
|
a,
|
|
|
|
b,
|
|
|
|
t2_00826.a,
|
|
|
|
t2_00826.b
|
|
|
|
FROM t1_00826
|
|
|
|
ALL INNER JOIN t2_00826 ON a = t2_00826.a
|
|
|
|
WHERE a = t2_00826.a
|
2021-02-19 14:06:57 +00:00
|
|
|
--- cross nullable ---
|
2020-09-08 20:05:47 +00:00
|
|
|
SELECT
|
2020-06-22 14:37:42 +00:00
|
|
|
a,
|
|
|
|
b,
|
|
|
|
t2_00826.a,
|
|
|
|
t2_00826.b
|
|
|
|
FROM t1_00826
|
|
|
|
ALL INNER JOIN t2_00826 ON a = t2_00826.a
|
|
|
|
WHERE a = t2_00826.a
|
2021-02-19 14:06:57 +00:00
|
|
|
--- cross nullable vs not nullable ---
|
2020-09-08 20:05:47 +00:00
|
|
|
SELECT
|
2020-06-22 14:37:42 +00:00
|
|
|
a,
|
|
|
|
b,
|
|
|
|
t2_00826.a,
|
|
|
|
t2_00826.b
|
|
|
|
FROM t1_00826
|
|
|
|
ALL INNER JOIN t2_00826 ON a = t2_00826.b
|
|
|
|
WHERE a = t2_00826.b
|
2021-02-19 14:06:57 +00:00
|
|
|
--- cross self ---
|
2020-09-08 20:05:47 +00:00
|
|
|
SELECT
|
2020-06-22 14:37:42 +00:00
|
|
|
a,
|
|
|
|
b,
|
|
|
|
y.a,
|
|
|
|
y.b
|
|
|
|
FROM t1_00826 AS x
|
|
|
|
ALL INNER JOIN t1_00826 AS y ON (a = y.a) AND (b = y.b)
|
|
|
|
WHERE (a = y.a) AND (b = y.b)
|
2021-02-19 14:06:57 +00:00
|
|
|
--- cross one table expr ---
|
2020-09-08 20:05:47 +00:00
|
|
|
SELECT
|
2020-06-22 14:37:42 +00:00
|
|
|
a,
|
|
|
|
b,
|
|
|
|
t2_00826.a,
|
|
|
|
t2_00826.b
|
|
|
|
FROM t1_00826
|
|
|
|
CROSS JOIN t2_00826
|
|
|
|
WHERE a = b
|
2021-02-19 14:06:57 +00:00
|
|
|
--- cross multiple ands ---
|
2020-09-08 20:05:47 +00:00
|
|
|
SELECT
|
2020-06-22 14:37:42 +00:00
|
|
|
a,
|
|
|
|
b,
|
|
|
|
t2_00826.a,
|
|
|
|
t2_00826.b
|
|
|
|
FROM t1_00826
|
|
|
|
ALL INNER JOIN t2_00826 ON (a = t2_00826.a) AND (b = t2_00826.b)
|
|
|
|
WHERE (a = t2_00826.a) AND (b = t2_00826.b)
|
2021-02-19 14:06:57 +00:00
|
|
|
--- cross and inside and ---
|
2020-09-08 20:05:47 +00:00
|
|
|
SELECT
|
2020-06-22 14:37:42 +00:00
|
|
|
a,
|
|
|
|
b,
|
|
|
|
t2_00826.a,
|
|
|
|
t2_00826.b
|
|
|
|
FROM t1_00826
|
2021-04-07 11:57:20 +00:00
|
|
|
ALL INNER JOIN t2_00826 ON (a = t2_00826.a) AND (a = t2_00826.a) AND (a = t2_00826.a) AND (b = t2_00826.b)
|
2020-06-22 14:37:42 +00:00
|
|
|
WHERE (a = t2_00826.a) AND ((a = t2_00826.a) AND ((a = t2_00826.a) AND (b = t2_00826.b)))
|
2021-02-19 14:06:57 +00:00
|
|
|
--- cross split conjunction ---
|
2020-09-08 20:05:47 +00:00
|
|
|
SELECT
|
2020-06-22 14:37:42 +00:00
|
|
|
a,
|
|
|
|
b,
|
|
|
|
t2_00826.a,
|
|
|
|
t2_00826.b
|
|
|
|
FROM t1_00826
|
|
|
|
ALL INNER JOIN t2_00826 ON (a = t2_00826.a) AND (b = t2_00826.b)
|
|
|
|
WHERE (a = t2_00826.a) AND (b = t2_00826.b) AND (a >= 1) AND (t2_00826.b > 0)
|
2021-02-19 14:06:57 +00:00
|
|
|
--- and or ---
|
|
|
|
SELECT
|
|
|
|
a,
|
|
|
|
b,
|
|
|
|
t2_00826.a,
|
|
|
|
t2_00826.b
|
|
|
|
FROM t1_00826
|
|
|
|
ALL INNER JOIN t2_00826 ON (a = t2_00826.a) AND (b = t2_00826.b)
|
|
|
|
WHERE (a = t2_00826.a) AND (b = t2_00826.b) AND ((a >= 1) OR (t2_00826.b = 1))
|
|
|
|
--- arithmetic expr ---
|
|
|
|
SELECT
|
|
|
|
a,
|
|
|
|
b,
|
|
|
|
t2_00826.a,
|
|
|
|
t2_00826.b
|
|
|
|
FROM t1_00826
|
|
|
|
ALL INNER JOIN t2_00826 ON (a + 1) = (t2_00826.a + t2_00826.b)
|
|
|
|
WHERE ((a + 1) = (t2_00826.a + t2_00826.b)) AND ((((a + b) + t2_00826.a) + t2_00826.b) > 5)
|
|
|
|
--- is null or ---
|
|
|
|
SELECT
|
|
|
|
a,
|
|
|
|
b,
|
|
|
|
t2_00826.a,
|
|
|
|
t2_00826.b
|
|
|
|
FROM t1_00826
|
|
|
|
ALL INNER JOIN t2_00826 ON b = t2_00826.a
|
2021-10-21 19:07:40 +00:00
|
|
|
WHERE (b = t2_00826.a) AND ((t2_00826.b IS NULL) OR (t2_00826.b > t2_00826.a))
|
2021-02-19 14:06:57 +00:00
|
|
|
--- do not rewrite alias ---
|
|
|
|
SELECT a AS b
|
|
|
|
FROM t1_00826
|
|
|
|
CROSS JOIN t2_00826
|
|
|
|
WHERE (b = t2_00826.a) AND (b > 0)
|
|
|
|
--- comma ---
|
|
|
|
SELECT
|
|
|
|
a,
|
|
|
|
b,
|
|
|
|
t2_00826.a,
|
|
|
|
t2_00826.b
|
|
|
|
FROM t1_00826
|
|
|
|
ALL INNER JOIN t2_00826 ON a = t2_00826.a
|
|
|
|
WHERE a = t2_00826.a
|
|
|
|
--- comma nullable ---
|
|
|
|
SELECT
|
|
|
|
a,
|
|
|
|
b,
|
|
|
|
t2_00826.a,
|
|
|
|
t2_00826.b
|
|
|
|
FROM t1_00826
|
|
|
|
ALL INNER JOIN t2_00826 ON b = t2_00826.b
|
|
|
|
WHERE b = t2_00826.b
|
|
|
|
--- comma and or ---
|
|
|
|
SELECT
|
|
|
|
a,
|
|
|
|
b,
|
|
|
|
t2_00826.a,
|
|
|
|
t2_00826.b
|
|
|
|
FROM t1_00826
|
|
|
|
ALL INNER JOIN t2_00826 ON a = t2_00826.a
|
2021-10-21 19:07:40 +00:00
|
|
|
WHERE (a = t2_00826.a) AND ((t2_00826.b IS NULL) OR (t2_00826.b < 2))
|