Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enable integration tests for GlareDB and std.sql.read_csv and std.sql.read_parquet for GlareDB #3749

Merged
merged 9 commits into from
Oct 27, 2023
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

**Features**:

- The `std.sql.read_csv` function and the `std.sql.read_parquet` function
supports the `sql.glaredb` target. (@eitsupi, #3749)

**Fixes**:

**Documentation**:
Expand All @@ -14,6 +17,8 @@

**Integrations**:

- Enable integration tests for GlareDB. (@eitsupi, #3749)

**Internal changes**:

**New Contributors**:
Expand Down
9 changes: 4 additions & 5 deletions prqlc/prql-compiler/src/sql/dialect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,11 @@ impl Dialect {
| Dialect::Postgres
| Dialect::MySql
| Dialect::Generic
| Dialect::ClickHouse => SupportLevel::Supported,
Dialect::MsSql
| Dialect::GlareDb
| Dialect::Ansi
| Dialect::BigQuery
| Dialect::Snowflake => SupportLevel::Unsupported,
| Dialect::ClickHouse => SupportLevel::Supported,
Dialect::MsSql | Dialect::Ansi | Dialect::BigQuery | Dialect::Snowflake => {
SupportLevel::Unsupported
}
}
}

Expand Down
4 changes: 4 additions & 0 deletions prqlc/prql-compiler/src/sql/std.sql.prql
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@ module glaredb {

@{binding_strength=9}
let regex_search = text pattern -> s"{text} ~ {pattern}"

let read_csv = source -> s"csv_scan({source:0})"

let read_parquet = source -> s"parquet_scan({source:0})"
}

module sqlite {
Expand Down
1 change: 1 addition & 0 deletions prqlc/prql-compiler/tests/integration/queries/loop.prql
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# clickhouse:skip (DB::Exception: Syntax error)
# glaredb:skip (DataFusion does not support recursive CTEs https://github.com/apache/arrow-datafusion/issues/462)
from [{n = 1}]
select n = n - 2
loop (filter n < 4 | select n = n + 1)
Expand Down
1 change: 1 addition & 0 deletions prqlc/prql-compiler/tests/integration/queries/switch.prql
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# glaredb:skip (May be a bag of String type conversion for Postgres Client)
# mssql:test
from tracks
sort milliseconds
Expand Down
2 changes: 1 addition & 1 deletion web/book/src/project/target.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ on every commit, and we'll endeavor to fix bugs.
- `sql.duckdb`
- `sql.generic`
{{footnote: while there's no "generic" DB to test `sql.generic` against, we still count it as supported.}}
- `sql.glaredb`
- `sql.mysql`
- `sql.postgres`
- `sql.sqlite`
Expand All @@ -46,7 +47,6 @@ minimally or not at all, and may have gaps for some features.
We're open to contributions to improve our coverage of these, and to adding
additional dialects.

- `sql.glaredb`
- `sql.mssql`
- `sql.ansi`
- `sql.bigquery`
Expand Down