-
Notifications
You must be signed in to change notification settings - Fork 598
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(bigquery, impala, mssql, oracle, postgres): compile `Table.sampl…
…e` to native `TABLESAMPLE` syntax when possible
- Loading branch information
Showing
73 changed files
with
527 additions
and
14 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
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
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
3 changes: 3 additions & 0 deletions
3
ibis/backends/tests/snapshots/test_sql/test_sample/bigquery-subquery/block.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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
SELECT | ||
* | ||
FROM `test` AS `t0` TABLESAMPLE system (50.0 PERCENT) |
5 changes: 5 additions & 0 deletions
5
ibis/backends/tests/snapshots/test_sql/test_sample/bigquery-subquery/row.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
SELECT | ||
* | ||
FROM `test` AS `t0` | ||
WHERE | ||
RAND() <= 0.5 |
11 changes: 11 additions & 0 deletions
11
ibis/backends/tests/snapshots/test_sql/test_sample/bigquery-table/block.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
SELECT | ||
* | ||
FROM ( | ||
SELECT | ||
* | ||
FROM `test` AS `t0` | ||
WHERE | ||
`t0`.`x` > 10 | ||
) AS `t1` | ||
WHERE | ||
RAND() <= 0.5 |
11 changes: 11 additions & 0 deletions
11
ibis/backends/tests/snapshots/test_sql/test_sample/bigquery-table/row.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
SELECT | ||
* | ||
FROM ( | ||
SELECT | ||
* | ||
FROM `test` AS `t0` | ||
WHERE | ||
`t0`.`x` > 10 | ||
) AS `t1` | ||
WHERE | ||
RAND() <= 0.5 |
5 changes: 5 additions & 0 deletions
5
ibis/backends/tests/snapshots/test_sql/test_sample/clickhouse-subquery/block.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
SELECT | ||
* | ||
FROM "test" AS "t0" | ||
WHERE | ||
randCanonical() <= 0.5 |
5 changes: 5 additions & 0 deletions
5
ibis/backends/tests/snapshots/test_sql/test_sample/clickhouse-subquery/row.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
SELECT | ||
* | ||
FROM "test" AS "t0" | ||
WHERE | ||
randCanonical() <= 0.5 |
11 changes: 11 additions & 0 deletions
11
ibis/backends/tests/snapshots/test_sql/test_sample/clickhouse-table/block.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
SELECT | ||
* | ||
FROM ( | ||
SELECT | ||
* | ||
FROM "test" AS "t0" | ||
WHERE | ||
"t0"."x" > 10 | ||
) AS "t1" | ||
WHERE | ||
randCanonical() <= 0.5 |
11 changes: 11 additions & 0 deletions
11
ibis/backends/tests/snapshots/test_sql/test_sample/clickhouse-table/row.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
SELECT | ||
* | ||
FROM ( | ||
SELECT | ||
* | ||
FROM "test" AS "t0" | ||
WHERE | ||
"t0"."x" > 10 | ||
) AS "t1" | ||
WHERE | ||
randCanonical() <= 0.5 |
5 changes: 5 additions & 0 deletions
5
ibis/backends/tests/snapshots/test_sql/test_sample/datafusion-subquery/block.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
SELECT | ||
* | ||
FROM "test" AS "t0" | ||
WHERE | ||
RANDOM() <= 0.5 |
5 changes: 5 additions & 0 deletions
5
ibis/backends/tests/snapshots/test_sql/test_sample/datafusion-subquery/row.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
SELECT | ||
* | ||
FROM "test" AS "t0" | ||
WHERE | ||
RANDOM() <= 0.5 |
11 changes: 11 additions & 0 deletions
11
ibis/backends/tests/snapshots/test_sql/test_sample/datafusion-table/block.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
SELECT | ||
* | ||
FROM ( | ||
SELECT | ||
* | ||
FROM "test" AS "t0" | ||
WHERE | ||
"t0"."x" > 10 | ||
) AS "t1" | ||
WHERE | ||
RANDOM() <= 0.5 |
11 changes: 11 additions & 0 deletions
11
ibis/backends/tests/snapshots/test_sql/test_sample/datafusion-table/row.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
SELECT | ||
* | ||
FROM ( | ||
SELECT | ||
* | ||
FROM "test" AS "t0" | ||
WHERE | ||
"t0"."x" > 10 | ||
) AS "t1" | ||
WHERE | ||
RANDOM() <= 0.5 |
3 changes: 3 additions & 0 deletions
3
ibis/backends/tests/snapshots/test_sql/test_sample/duckdb-subquery/block.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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
SELECT | ||
* | ||
FROM "test" AS "t0" TABLESAMPLE system (50.0 PERCENT) |
3 changes: 3 additions & 0 deletions
3
ibis/backends/tests/snapshots/test_sql/test_sample/duckdb-subquery/row.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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
SELECT | ||
* | ||
FROM "test" AS "t0" TABLESAMPLE bernoulli (50.0 PERCENT) |
9 changes: 9 additions & 0 deletions
9
ibis/backends/tests/snapshots/test_sql/test_sample/duckdb-table/block.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
SELECT | ||
* | ||
FROM ( | ||
SELECT | ||
* | ||
FROM "test" AS "t0" | ||
WHERE | ||
"t0"."x" > 10 | ||
) AS "t1" TABLESAMPLE system (50.0 PERCENT) |
9 changes: 9 additions & 0 deletions
9
ibis/backends/tests/snapshots/test_sql/test_sample/duckdb-table/row.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
SELECT | ||
* | ||
FROM ( | ||
SELECT | ||
* | ||
FROM "test" AS "t0" | ||
WHERE | ||
"t0"."x" > 10 | ||
) AS "t1" TABLESAMPLE bernoulli (50.0 PERCENT) |
5 changes: 5 additions & 0 deletions
5
ibis/backends/tests/snapshots/test_sql/test_sample/exasol-subquery/block.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
SELECT | ||
* | ||
FROM "test" AS "t0" | ||
WHERE | ||
RANDOM() <= 0.5 |
5 changes: 5 additions & 0 deletions
5
ibis/backends/tests/snapshots/test_sql/test_sample/exasol-subquery/row.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
SELECT | ||
* | ||
FROM "test" AS "t0" | ||
WHERE | ||
RANDOM() <= 0.5 |
11 changes: 11 additions & 0 deletions
11
ibis/backends/tests/snapshots/test_sql/test_sample/exasol-table/block.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
SELECT | ||
* | ||
FROM ( | ||
SELECT | ||
* | ||
FROM "test" AS "t0" | ||
WHERE | ||
"t0"."x" > 10 | ||
) AS "t1" | ||
WHERE | ||
RANDOM() <= 0.5 |
11 changes: 11 additions & 0 deletions
11
ibis/backends/tests/snapshots/test_sql/test_sample/exasol-table/row.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
SELECT | ||
* | ||
FROM ( | ||
SELECT | ||
* | ||
FROM "test" AS "t0" | ||
WHERE | ||
"t0"."x" > 10 | ||
) AS "t1" | ||
WHERE | ||
RANDOM() <= 0.5 |
5 changes: 5 additions & 0 deletions
5
ibis/backends/tests/snapshots/test_sql/test_sample/flink-subquery/block.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
SELECT | ||
* | ||
FROM `test` AS `t0` | ||
WHERE | ||
RAND() <= 0.5 |
5 changes: 5 additions & 0 deletions
5
ibis/backends/tests/snapshots/test_sql/test_sample/flink-subquery/row.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
SELECT | ||
* | ||
FROM `test` AS `t0` | ||
WHERE | ||
RAND() <= 0.5 |
11 changes: 11 additions & 0 deletions
11
ibis/backends/tests/snapshots/test_sql/test_sample/flink-table/block.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
SELECT | ||
* | ||
FROM ( | ||
SELECT | ||
* | ||
FROM `test` AS `t0` | ||
WHERE | ||
`t0`.`x` > 10 | ||
) AS `t1` | ||
WHERE | ||
RAND() <= 0.5 |
Oops, something went wrong.