-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[sqllogictets] Remove postgres container orchestration #5015
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
Changes from all commits
c9c1179
e86339c
35315b4
5569bee
c41a0a8
99a2efd
649727b
437df59
2662509
dc81ec3
797f605
1e33041
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -46,16 +46,33 @@ cargo test -p datafusion --test sqllogictests -- information | |||||
|
|
||||||
| #### Running tests: Postgres compatibility | ||||||
|
|
||||||
| Test files that start with prefix `pg_compat_` verify compatibility with Postgres. | ||||||
| Datafusion runs these test files during normal sqllogictest runs. | ||||||
| Test files that start with prefix `pg_compat_` verify compatibility | ||||||
| with Postgres by running the same script files both with DataFusion and with Posgres | ||||||
|
|
||||||
| In order to run sqllogictests with Postgres execute: | ||||||
| In order to run the sqllogictests running against a previously running Postgres instance, do: | ||||||
|
|
||||||
| ```shell | ||||||
| PG_COMPAT=true cargo test -p datafusion --test sqllogictests | ||||||
| PG_COMPAT=true PG_URI="postgresql://postgres@127.0.0.1/postgres" cargo test -p datafusion --test sqllogictests | ||||||
| ``` | ||||||
|
|
||||||
| This command requires a docker binary. Check that docker is properly installed with `which docker`. | ||||||
| The environemnt variables: | ||||||
|
|
||||||
| 1. `PG_COMPAT` instructs sqllogictest to run against Postgres (not DataFusion) | ||||||
| 2. `PG_URI` contains a `libpq` style connection string, whose format is described in | ||||||
| [the docs](https://docs.rs/tokio-postgres/latest/tokio_postgres/config/struct.Config.html#url) | ||||||
|
|
||||||
| One way to create a suitable a posgres container in docker is to use | ||||||
| the [Official Image](https://hub.docker.com/_/postgres) with a command | ||||||
| such as the following. Note the collation **must** be set to `C` otherwise | ||||||
| `ORDER BY` will not match DataFusion and the tests will diff. | ||||||
|
|
||||||
| ```shell | ||||||
| docker run \ | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think |
||||||
| -p5432:5432 \ | ||||||
| -e POSTGRES_INITDB_ARGS="--encoding=UTF-8 --lc-collate=C --lc-ctype=C" \ | ||||||
| -e POSTGRES_HOST_AUTH_METHOD=trust \ | ||||||
| postgres | ||||||
| ``` | ||||||
|
|
||||||
| #### Updating tests: Completion Mode | ||||||
|
|
||||||
|
|
||||||
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this starts the container using the code from
integration-tests(above in this file) rather than running docker from within the harness