-
Notifications
You must be signed in to change notification settings - Fork 567
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(sql): use trivial compilation
- Loading branch information
Showing
201 changed files
with
3,513 additions
and
4,482 deletions.
There are no files selected for viewing
14 changes: 1 addition & 13 deletions
14
ibis/backends/bigquery/tests/unit/snapshots/test_compiler/test_identical_to/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
45 changes: 30 additions & 15 deletions
45
...nit/snapshots/test_compiler/test_projection_fusion_only_peeks_at_immediate_parent/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,19 +1,34 @@ | ||
WITH `t1` AS ( | ||
WITH `t4` AS ( | ||
SELECT | ||
CAST(`t0`.`file_date` AS DATE) AS `file_date`, | ||
`t0`.`PARTITIONTIME`, | ||
`t0`.`val`, | ||
`t0`.`val` * 2 AS `XYZ` | ||
FROM `unbound_table` AS `t0` | ||
WHERE | ||
`t0`.`PARTITIONTIME` < DATE(2017, 1, 1) | ||
AND CAST(`t0`.`file_date` AS DATE) < DATE(2017, 1, 1) | ||
`t3`.`file_date`, | ||
`t3`.`PARTITIONTIME`, | ||
`t3`.`val`, | ||
`t3`.`val` * 2 AS `XYZ` | ||
FROM ( | ||
SELECT | ||
* | ||
FROM ( | ||
SELECT | ||
CAST(`t1`.`file_date` AS DATE) AS `file_date`, | ||
`t1`.`PARTITIONTIME`, | ||
`t1`.`val` | ||
FROM ( | ||
SELECT | ||
* | ||
FROM `unbound_table` AS `t0` | ||
WHERE | ||
`t0`.`PARTITIONTIME` < DATE(2017, 1, 1) | ||
) AS `t1` | ||
) AS `t2` | ||
WHERE | ||
`t2`.`file_date` < DATE(2017, 1, 1) | ||
) AS `t3` | ||
) | ||
SELECT | ||
`t3`.`file_date`, | ||
`t3`.`PARTITIONTIME`, | ||
`t3`.`val`, | ||
`t3`.`XYZ` | ||
FROM `t1` AS `t3` | ||
INNER JOIN `t1` AS `t4` | ||
`t6`.`file_date`, | ||
`t6`.`PARTITIONTIME`, | ||
`t6`.`val`, | ||
`t6`.`XYZ` | ||
FROM `t4` AS `t6` | ||
INNER JOIN `t4` AS `t7` | ||
ON TRUE |
14 changes: 1 addition & 13 deletions
14
ibis/backends/clickhouse/tests/snapshots/test_select/test_isin_notin_in_select/out1.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,17 +1,5 @@ | ||
SELECT | ||
"t0"."id", | ||
"t0"."bool_col", | ||
"t0"."tinyint_col", | ||
"t0"."smallint_col", | ||
"t0"."int_col", | ||
"t0"."bigint_col", | ||
"t0"."float_col", | ||
"t0"."double_col", | ||
"t0"."date_string_col", | ||
"t0"."string_col", | ||
"t0"."timestamp_col", | ||
"t0"."year", | ||
"t0"."month" | ||
* | ||
FROM "functional_alltypes" AS "t0" | ||
WHERE | ||
"t0"."string_col" IN ('foo', 'bar') |
14 changes: 1 addition & 13 deletions
14
ibis/backends/clickhouse/tests/snapshots/test_select/test_isin_notin_in_select/out2.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
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
14 changes: 1 addition & 13 deletions
14
ibis/backends/clickhouse/tests/snapshots/test_select/test_where_simple_comparisons/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
14 changes: 1 addition & 13 deletions
14
ibis/backends/clickhouse/tests/snapshots/test_select/test_where_with_between/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,17 +1,5 @@ | ||
SELECT | ||
"t0"."id", | ||
"t0"."bool_col", | ||
"t0"."tinyint_col", | ||
"t0"."smallint_col", | ||
"t0"."int_col", | ||
"t0"."bigint_col", | ||
"t0"."float_col", | ||
"t0"."double_col", | ||
"t0"."date_string_col", | ||
"t0"."string_col", | ||
"t0"."timestamp_col", | ||
"t0"."year", | ||
"t0"."month" | ||
* | ||
FROM "functional_alltypes" AS "t0" | ||
WHERE | ||
"t0"."int_col" > 0 AND "t0"."float_col" BETWEEN 0 AND 1 |
26 changes: 18 additions & 8 deletions
26
ibis/backends/postgres/tests/snapshots/test_geospatial/test_geo_equals/out1.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,9 +1,19 @@ | ||
SELECT | ||
"t0"."id", | ||
ST_ASEWKB("t0"."geo_point") AS "geo_point", | ||
ST_ASEWKB("t0"."geo_linestring") AS "geo_linestring", | ||
ST_ASEWKB("t0"."geo_polygon") AS "geo_polygon", | ||
ST_ASEWKB("t0"."geo_multipolygon") AS "geo_multipolygon", | ||
ST_Y("t0"."geo_point") AS "Location_Latitude", | ||
ST_Y("t0"."geo_point") AS "Latitude" | ||
FROM "geo" AS "t0" | ||
"t1"."id", | ||
ST_ASEWKB("t1"."geo_point") AS "geo_point", | ||
ST_ASEWKB("t1"."geo_linestring") AS "geo_linestring", | ||
ST_ASEWKB("t1"."geo_polygon") AS "geo_polygon", | ||
ST_ASEWKB("t1"."geo_multipolygon") AS "geo_multipolygon", | ||
"t1"."Location_Latitude", | ||
"t1"."Latitude" | ||
FROM ( | ||
SELECT | ||
"t0"."id", | ||
"t0"."geo_point", | ||
"t0"."geo_linestring", | ||
"t0"."geo_polygon", | ||
"t0"."geo_multipolygon", | ||
ST_Y("t0"."geo_point") AS "Location_Latitude", | ||
ST_Y("t0"."geo_point") AS "Latitude" | ||
FROM "geo" AS "t0" | ||
) AS "t1" |
8 changes: 6 additions & 2 deletions
8
.../postgres/tests/snapshots/test_geospatial/test_geo_ops_smoke/linestring_end_point/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,3 +1,7 @@ | ||
SELECT | ||
ST_ASEWKB(ST_ENDPOINT("t0"."geo_linestring")) AS "GeoEndPoint(geo_linestring)" | ||
FROM "geo" AS "t0" | ||
ST_ASEWKB("t1"."GeoEndPoint(geo_linestring)") AS "GeoEndPoint(geo_linestring)" | ||
FROM ( | ||
SELECT | ||
ST_ENDPOINT("t0"."geo_linestring") AS "GeoEndPoint(geo_linestring)" | ||
FROM "geo" AS "t0" | ||
) AS "t1" |
8 changes: 6 additions & 2 deletions
8
...ostgres/tests/snapshots/test_geospatial/test_geo_ops_smoke/linestring_start_point/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,3 +1,7 @@ | ||
SELECT | ||
ST_ASEWKB(ST_STARTPOINT("t0"."geo_linestring")) AS "GeoStartPoint(geo_linestring)" | ||
FROM "geo" AS "t0" | ||
ST_ASEWKB("t1"."GeoStartPoint(geo_linestring)") AS "GeoStartPoint(geo_linestring)" | ||
FROM ( | ||
SELECT | ||
ST_STARTPOINT("t0"."geo_linestring") AS "GeoStartPoint(geo_linestring)" | ||
FROM "geo" AS "t0" | ||
) AS "t1" |
8 changes: 6 additions & 2 deletions
8
...ckends/postgres/tests/snapshots/test_geospatial/test_geo_ops_smoke/point_set_srid/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,3 +1,7 @@ | ||
SELECT | ||
ST_ASEWKB(ST_SETSRID("t0"."geo_point", 4326)) AS "GeoSetSRID(geo_point, 4326)" | ||
FROM "geo" AS "t0" | ||
ST_ASEWKB("t1"."GeoSetSRID(geo_point, 4326)") AS "GeoSetSRID(geo_point, 4326)" | ||
FROM ( | ||
SELECT | ||
ST_SETSRID("t0"."geo_point", 4326) AS "GeoSetSRID(geo_point, 4326)" | ||
FROM "geo" AS "t0" | ||
) AS "t1" |
8 changes: 6 additions & 2 deletions
8
ibis/backends/postgres/tests/snapshots/test_postgis/test_select_linestring_geodata/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,3 +1,7 @@ | ||
SELECT | ||
ST_ASEWKB("t0"."geo_linestring") AS "geo_linestring" | ||
FROM "geo" AS "t0" | ||
ST_ASEWKB("t1"."geo_linestring") AS "geo_linestring" | ||
FROM ( | ||
SELECT | ||
"t0"."geo_linestring" | ||
FROM "geo" AS "t0" | ||
) AS "t1" |
8 changes: 6 additions & 2 deletions
8
ibis/backends/postgres/tests/snapshots/test_postgis/test_select_multipolygon_geodata/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,3 +1,7 @@ | ||
SELECT | ||
ST_ASEWKB("t0"."geo_multipolygon") AS "geo_multipolygon" | ||
FROM "geo" AS "t0" | ||
ST_ASEWKB("t1"."geo_multipolygon") AS "geo_multipolygon" | ||
FROM ( | ||
SELECT | ||
"t0"."geo_multipolygon" | ||
FROM "geo" AS "t0" | ||
) AS "t1" |
8 changes: 6 additions & 2 deletions
8
ibis/backends/postgres/tests/snapshots/test_postgis/test_select_point_geodata/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,3 +1,7 @@ | ||
SELECT | ||
ST_ASEWKB("t0"."geo_point") AS "geo_point" | ||
FROM "geo" AS "t0" | ||
ST_ASEWKB("t1"."geo_point") AS "geo_point" | ||
FROM ( | ||
SELECT | ||
"t0"."geo_point" | ||
FROM "geo" AS "t0" | ||
) AS "t1" |
8 changes: 6 additions & 2 deletions
8
ibis/backends/postgres/tests/snapshots/test_postgis/test_select_polygon_geodata/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,3 +1,7 @@ | ||
SELECT | ||
ST_ASEWKB("t0"."geo_polygon") AS "geo_polygon" | ||
FROM "geo" AS "t0" | ||
ST_ASEWKB("t1"."geo_polygon") AS "geo_polygon" | ||
FROM ( | ||
SELECT | ||
"t0"."geo_polygon" | ||
FROM "geo" AS "t0" | ||
) AS "t1" |
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
Oops, something went wrong.