2010YOUY01 commented on code in PR #21108:
URL: https://github.com/apache/datafusion/pull/21108#discussion_r2978477238


##########
datafusion/sqllogictest/bin/sqllogictests.rs:
##########
@@ -512,26 +525,35 @@ async fn run_test_file(
     pb.set_style(mp_style);
     pb.set_message(format!("{:?}", &relative_path));
 
+    // If DataFusion configuration has changed during test file runs, errors 
will be
+    // pushed to this vec.
+    let config_change_errors = Arc::new(Mutex::new(Vec::new()));
     let mut runner = sqllogictest::Runner::new(|| async {
         Ok(DataFusion::new(
             test_ctx.session_ctx().clone(),
             relative_path.clone(),
             pb.clone(),
         )
-        
.with_currently_executing_sql_tracker(currently_executing_sql_tracker.clone()))
+        
.with_currently_executing_sql_tracker(currently_executing_sql_tracker.clone())
+        .with_config_change_errors(Arc::clone(&config_change_errors)))
     });
     runner.add_label("Datafusion");
     runner.with_column_validator(strict_column_validator);
     runner.with_normalizer(value_normalizer);
     runner.with_validator(validator);
-    let result = run_file_in_runner(path, runner, filters, 
colored_output).await;
+    let result = run_file_in_runner(path, &mut runner, filters, 
colored_output).await;
     pb.finish_and_clear();
-    result
+
+    result?;
+
+    // If there was no correctness error, check that the config is unchanged.
+    runner.shutdown_async().await;
+    take_config_change_result(&config_change_errors)

Review Comment:
   Yes, it's due `sqllogictest` is an external dependency, and it's not able to 
directly access the inner DataFusion runner, and I can't find an easier way to 
do it.
   
   Added comments to explain.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to