Skip to content

Commit 8ebed67

Browse files
authored
Script and documentation for regenerating sqlite test files (#14290)
* Adding script and documentation for regenerating sqlite test files. * Prettier. * Script updates, include customized sqllogictests.rs file for regeneration. * Minor comment update * Removed use of sed, fixed using host.docker.internal when starting up pg via docker, cleanup pg_compat .bak files.
1 parent ad60ffc commit 8ebed67

File tree

5 files changed

+946
-2
lines changed

5 files changed

+946
-2
lines changed

datafusion/sqllogictest/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,13 @@ database engine. The output is a full script that is a copy of the prototype scr
250250

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

253+
To regenerate and complete the sqlite test suite's files in datafusion-testing/data/sqlite/ please refer to the
254+
'./regenerate_sqlite_files.sh' file.
255+
256+
_WARNING_: The regenerate_sqlite_files.sh is experimental and should be understood and run with an abundance of caution.
257+
When run the script will clone a remote repository locally, replace the location of a dependency with a custom git
258+
version, will replace an existing .rs file with one from a github gist and will run various commands locally.
259+
253260
```shell
254261
# Update ddl.slt with output from running
255262
cargo test --test sqllogictests -- ddl --complete

datafusion/sqllogictest/bin/postgres_container.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ async fn start_postgres(
123123
.await
124124
.unwrap();
125125
// uncomment this if you are running docker in docker
126-
let host = "host.docker.internal".to_string();
127-
// let host = container.get_host().await.unwrap().to_string();
126+
// let host = "host.docker.internal".to_string();
127+
let host = container.get_host().await.unwrap().to_string();
128128
let port = container.get_host_port_ipv4(5432).await.unwrap();
129129

130130
let mut rx = in_channel.rx.lock().await;

0 commit comments

Comments
 (0)