Apache DataFusion SQL Query Engine
bump sqllogictest to 0.15.0 (#6941)
Jonah Gaof245869c7f52
diff --git a/datafusion/core/Cargo.toml b/datafusion/core/Cargo.tomlindex ba986bd1cf..8c79c98ff9 100644--- a/datafusion/core/Cargo.toml+++ b/datafusion/core/Cargo.toml@@ -110,7 +110,7 @@ postgres-types = { version = "0.2.4", features = ["derive", "with-chrono-0_4"] }regex = "1.5.4"rstest = "0.18.0"rust_decimal = { version = "1.27.0", features = ["tokio-pg"] }-sqllogictest = "0.14.0"+sqllogictest = "0.15.0"test-utils = { path = "../../test-utils" }thiserror = "1.0.37"tokio-postgres = "0.7.7"diff --git a/datafusion/core/tests/sqllogictests/src/main.rs b/datafusion/core/tests/sqllogictests/src/main.rsindex f71e98b54b..58089be245 100644--- a/datafusion/core/tests/sqllogictests/src/main.rs+++ b/datafusion/core/tests/sqllogictests/src/main.rs@@ -128,8 +128,12 @@ async fn run_test_file(test_file: TestFile) -> Result<()> {info!("Skipping: {}", path.display());return Ok(());};- let ctx = test_ctx.session_ctx().clone();- let mut runner = sqllogictest::Runner::new(DataFusion::new(ctx, relative_path));+ let mut runner = sqllogictest::Runner::new(|| async {+ Ok(DataFusion::new(+ test_ctx.session_ctx().clone(),+ relative_path.clone(),+ ))+ });runner.with_column_validator(strict_column_validator);runner.run_file_async(path)@@ -143,10 +147,8 @@ async fn run_test_file_with_postgres(test_file: TestFile) -> Result<()> {relative_path,} = test_file;info!("Running with Postgres runner: {}", path.display());- let postgres_client = Postgres::connect(relative_path)- .await- .map_err(|e| DataFusionError::External(Box::new(e)))?;- let mut runner = sqllogictest::Runner::new(postgres_client);+ let mut runner =+ sqllogictest::Runner::new(|| Postgres::connect(relative_path.clone()));runner.with_column_validator(strict_column_validator);runner.run_file_async(path)@@ -168,9 +170,12 @@ async fn run_complete_file(test_file: TestFile) -> Result<()> {info!("Skipping: {}", path.display());return Ok(());};- let ctx = test_ctx.session_ctx().clone();- let mut runner =- sqllogictest::Runner::new(DataFusion::new(ctx, relative_path.clone()));+ let mut runner = sqllogictest::Runner::new(|| async {+ Ok(DataFusion::new(+ test_ctx.session_ctx().clone(),+ relative_path.clone(),+ ))+ });let col_separator = " ";runner.update_test_file(