-
Notifications
You must be signed in to change notification settings - Fork 603
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
42 changed files
with
682 additions
and
620 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
55 changes: 30 additions & 25 deletions
55
ibis/backends/tests/sql/snapshots/test_select_sql/test_aggregate_count_joined/decompiled.py
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,29 +1,34 @@ | ||
import ibis | ||
|
||
|
||
tpch_region = ibis.table( | ||
name="tpch_region", | ||
schema={"r_regionkey": "int16", "r_name": "string", "r_comment": "string"}, | ||
) | ||
|
||
result = tpch_region.inner_join( | ||
result = ( | ||
ibis.table( | ||
name="tpch_nation", | ||
schema={ | ||
"n_nationkey": "int16", | ||
"n_name": "string", | ||
"n_regionkey": "int16", | ||
"n_comment": "string", | ||
}, | ||
), | ||
tpch_region.r_regionkey | ||
== ibis.table( | ||
name="tpch_nation", | ||
schema={ | ||
"n_nationkey": "int16", | ||
"n_name": "string", | ||
"n_regionkey": "int16", | ||
"n_comment": "string", | ||
}, | ||
).n_regionkey, | ||
).count() | ||
name="tpch_region", | ||
schema={"r_regionkey": "int16", "r_name": "string", "r_comment": "string"}, | ||
) | ||
.inner_join( | ||
ibis.table( | ||
name="tpch_nation", | ||
schema={ | ||
"n_nationkey": "int16", | ||
"n_name": "string", | ||
"n_regionkey": "int16", | ||
"n_comment": "string", | ||
}, | ||
), | ||
ibis.table( | ||
name="tpch_region", | ||
schema={"r_regionkey": "int16", "r_name": "string", "r_comment": "string"}, | ||
).r_regionkey | ||
== ibis.table( | ||
name="tpch_nation", | ||
schema={ | ||
"n_nationkey": "int16", | ||
"n_name": "string", | ||
"n_regionkey": "int16", | ||
"n_comment": "string", | ||
}, | ||
).n_regionkey, | ||
) | ||
.count() | ||
) |
22 changes: 11 additions & 11 deletions
22
.../backends/tests/sql/snapshots/test_select_sql/test_aggregate_projection_alias_bug/out.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,16 +1,16 @@ | ||
SELECT | ||
t4.foo_id AS foo_id, | ||
SUM(t4.value1) AS total | ||
t5.foo_id AS foo_id, | ||
SUM(t5.value1) AS total | ||
FROM ( | ||
SELECT | ||
t0.c AS c, | ||
t0.f AS f, | ||
t0.foo_id AS foo_id, | ||
t0.bar_id AS bar_id, | ||
t2.value1 AS value1 | ||
FROM star1 AS t0 | ||
INNER JOIN star2 AS t2 | ||
ON t0.foo_id = t2.foo_id | ||
) AS t4 | ||
t2.c AS c, | ||
t2.f AS f, | ||
t2.foo_id AS foo_id, | ||
t2.bar_id AS bar_id, | ||
t3.value1 AS value1 | ||
FROM star1 AS t2 | ||
INNER JOIN star2 AS t3 | ||
ON t2.foo_id = t3.foo_id | ||
) AS t5 | ||
GROUP BY | ||
1 |
11 changes: 6 additions & 5 deletions
11
ibis/backends/tests/sql/snapshots/test_select_sql/test_anti_join/decompiled.py
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
14 changes: 7 additions & 7 deletions
14
ibis/backends/tests/sql/snapshots/test_select_sql/test_anti_join/out.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,8 +1,8 @@ | ||
SELECT | ||
t0.c AS c, | ||
t0.f AS f, | ||
t0.foo_id AS foo_id, | ||
t0.bar_id AS bar_id | ||
FROM star1 AS t0 | ||
ANTI JOIN star2 AS t2 | ||
ON t0.foo_id = t2.foo_id | ||
t2.c AS c, | ||
t2.f AS f, | ||
t2.foo_id AS foo_id, | ||
t2.bar_id AS bar_id | ||
FROM star1 AS t2 | ||
ANTI JOIN star2 AS t3 | ||
ON t2.foo_id = t3.foo_id |
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
108 changes: 63 additions & 45 deletions
108
ibis/backends/tests/sql/snapshots/test_select_sql/test_join_just_materialized/decompiled.py
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,52 +1,70 @@ | ||
import ibis | ||
|
||
|
||
tpch_nation = ibis.table( | ||
name="tpch_nation", | ||
schema={ | ||
"n_nationkey": "int16", | ||
"n_name": "string", | ||
"n_regionkey": "int16", | ||
"n_comment": "string", | ||
}, | ||
) | ||
|
||
result = tpch_nation.inner_join( | ||
ibis.table( | ||
name="tpch_region", | ||
schema={"r_regionkey": "int16", "r_name": "string", "r_comment": "string"}, | ||
), | ||
tpch_nation.n_regionkey | ||
== ibis.table( | ||
name="tpch_region", | ||
schema={"r_regionkey": "int16", "r_name": "string", "r_comment": "string"}, | ||
).r_regionkey, | ||
).inner_join( | ||
result = ( | ||
ibis.table( | ||
name="tpch_customer", | ||
schema={ | ||
"c_custkey": "int64", | ||
"c_name": "string", | ||
"c_address": "string", | ||
"c_nationkey": "int16", | ||
"c_phone": "string", | ||
"c_acctbal": "decimal", | ||
"c_mktsegment": "string", | ||
"c_comment": "string", | ||
}, | ||
), | ||
tpch_nation.n_nationkey | ||
== ibis.table( | ||
name="tpch_customer", | ||
name="tpch_nation", | ||
schema={ | ||
"c_custkey": "int64", | ||
"c_name": "string", | ||
"c_address": "string", | ||
"c_nationkey": "int16", | ||
"c_phone": "string", | ||
"c_acctbal": "decimal", | ||
"c_mktsegment": "string", | ||
"c_comment": "string", | ||
"n_nationkey": "int16", | ||
"n_name": "string", | ||
"n_regionkey": "int16", | ||
"n_comment": "string", | ||
}, | ||
).c_nationkey, | ||
) | ||
.inner_join( | ||
ibis.table( | ||
name="tpch_region", | ||
schema={"r_regionkey": "int16", "r_name": "string", "r_comment": "string"}, | ||
), | ||
ibis.table( | ||
name="tpch_nation", | ||
schema={ | ||
"n_nationkey": "int16", | ||
"n_name": "string", | ||
"n_regionkey": "int16", | ||
"n_comment": "string", | ||
}, | ||
).n_regionkey | ||
== ibis.table( | ||
name="tpch_region", | ||
schema={"r_regionkey": "int16", "r_name": "string", "r_comment": "string"}, | ||
).r_regionkey, | ||
) | ||
.inner_join( | ||
ibis.table( | ||
name="tpch_customer", | ||
schema={ | ||
"c_custkey": "int64", | ||
"c_name": "string", | ||
"c_address": "string", | ||
"c_nationkey": "int16", | ||
"c_phone": "string", | ||
"c_acctbal": "decimal", | ||
"c_mktsegment": "string", | ||
"c_comment": "string", | ||
}, | ||
), | ||
ibis.table( | ||
name="tpch_nation", | ||
schema={ | ||
"n_nationkey": "int16", | ||
"n_name": "string", | ||
"n_regionkey": "int16", | ||
"n_comment": "string", | ||
}, | ||
).n_nationkey | ||
== ibis.table( | ||
name="tpch_customer", | ||
schema={ | ||
"c_custkey": "int64", | ||
"c_name": "string", | ||
"c_address": "string", | ||
"c_nationkey": "int16", | ||
"c_phone": "string", | ||
"c_acctbal": "decimal", | ||
"c_mktsegment": "string", | ||
"c_comment": "string", | ||
}, | ||
).c_nationkey, | ||
) | ||
) |
40 changes: 20 additions & 20 deletions
40
ibis/backends/tests/sql/snapshots/test_select_sql/test_join_just_materialized/out.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,21 +1,21 @@ | ||
SELECT | ||
t0.n_nationkey AS n_nationkey, | ||
t0.n_name AS n_name, | ||
t0.n_regionkey AS n_regionkey, | ||
t0.n_comment AS n_comment, | ||
t3.r_regionkey AS r_regionkey, | ||
t3.r_name AS r_name, | ||
t3.r_comment AS r_comment, | ||
t4.c_custkey AS c_custkey, | ||
t4.c_name AS c_name, | ||
t4.c_address AS c_address, | ||
t4.c_nationkey AS c_nationkey, | ||
t4.c_phone AS c_phone, | ||
t4.c_acctbal AS c_acctbal, | ||
t4.c_mktsegment AS c_mktsegment, | ||
t4.c_comment AS c_comment | ||
FROM tpch_nation AS t0 | ||
INNER JOIN tpch_region AS t3 | ||
ON t0.n_regionkey = t3.r_regionkey | ||
INNER JOIN tpch_customer AS t4 | ||
ON t0.n_nationkey = t4.c_nationkey | ||
t3.n_nationkey AS n_nationkey, | ||
t3.n_name AS n_name, | ||
t3.n_regionkey AS n_regionkey, | ||
t3.n_comment AS n_comment, | ||
t4.r_regionkey AS r_regionkey, | ||
t4.r_name AS r_name, | ||
t4.r_comment AS r_comment, | ||
t5.c_custkey AS c_custkey, | ||
t5.c_name AS c_name, | ||
t5.c_address AS c_address, | ||
t5.c_nationkey AS c_nationkey, | ||
t5.c_phone AS c_phone, | ||
t5.c_acctbal AS c_acctbal, | ||
t5.c_mktsegment AS c_mktsegment, | ||
t5.c_comment AS c_comment | ||
FROM tpch_nation AS t3 | ||
INNER JOIN tpch_region AS t4 | ||
ON t3.n_regionkey = t4.r_regionkey | ||
INNER JOIN tpch_customer AS t5 | ||
ON t3.n_nationkey = t5.c_nationkey |
Oops, something went wrong.