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

Script and documentation for regenerating sqlite test files #14290

Merged
merged 6 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions datafusion/sqllogictest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,13 @@ database engine. The output is a full script that is a copy of the prototype scr

You can update the tests / generate expected output by passing the `--complete` argument.

To regenerate and complete the sqlite test suite's files in datafusion-testing/data/sqlite/ please refer to the
'./regenerate_sqlite_files.sh' file.

_WARNING_: The regenerate_sqlite_files.sh is experimental and should be understood and run with an abundance of caution.
When run the script will clone a remote repository locally, replace the location of a dependency with a custom git
version, will replace an existing .rs file with one from a github gist and will run various commands locally.

```shell
# Update ddl.slt with output from running
cargo test --test sqllogictests -- ddl --complete
Expand Down
4 changes: 2 additions & 2 deletions datafusion/sqllogictest/bin/postgres_container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ async fn start_postgres(
.await
.unwrap();
// uncomment this if you are running docker in docker
let host = "host.docker.internal".to_string();
// let host = container.get_host().await.unwrap().to_string();
// let host = "host.docker.internal".to_string();
let host = container.get_host().await.unwrap().to_string();
let port = container.get_host_port_ipv4(5432).await.unwrap();

let mut rx = in_channel.rx.lock().await;
Expand Down
Loading