You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by al...@apache.org on 2025/02/05 12:25:05 UTC

(datafusion) branch main updated: Fix a clippy warning in `datafusion-sqllogictest` (#14506)

This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git


The following commit(s) were added to refs/heads/main by this push:
     new e7e1a1d815 Fix a clippy warning in `datafusion-sqllogictest` (#14506)
e7e1a1d815 is described below

commit e7e1a1d815b7abd9f28f3b23b35e48f1cb71c37b
Author: Matthijs Brobbel <m1...@gmail.com>
AuthorDate: Wed Feb 5 13:24:59 2025 +0100

    Fix a clippy warning in `datafusion-sqllogictest` (#14506)
---
 datafusion/sqllogictest/src/engines/postgres_engine/mod.rs | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/datafusion/sqllogictest/src/engines/postgres_engine/mod.rs b/datafusion/sqllogictest/src/engines/postgres_engine/mod.rs
index 6391f666b4..21fdedd9a5 100644
--- a/datafusion/sqllogictest/src/engines/postgres_engine/mod.rs
+++ b/datafusion/sqllogictest/src/engines/postgres_engine/mod.rs
@@ -17,6 +17,7 @@
 
 use async_trait::async_trait;
 use bytes::Bytes;
+use datafusion_common_runtime::SpawnedTask;
 use futures::{SinkExt, StreamExt};
 use log::{debug, info};
 use sqllogictest::DBOutput;
@@ -24,7 +25,6 @@ use sqllogictest::DBOutput;
 use std::path::{Path, PathBuf};
 use std::str::FromStr;
 use std::time::Duration;
-use tokio::task::JoinHandle;
 
 use super::conversion::*;
 use crate::engines::output::{DFColumnType, DFOutput};
@@ -54,7 +54,7 @@ pub type Result<T, E = Error> = std::result::Result<T, E>;
 
 pub struct Postgres {
     client: tokio_postgres::Client,
-    join_handle: JoinHandle<()>,
+    _spawned_task: SpawnedTask<()>,
     /// Relative test file path
     relative_path: PathBuf,
     pb: ProgressBar,
@@ -90,7 +90,7 @@ impl Postgres {
 
         let (client, connection) = res?;
 
-        let join_handle = tokio::spawn(async move {
+        let _spawned_task = SpawnedTask::spawn(async move {
             if let Err(e) = connection.await {
                 log::error!("Postgres connection error: {:?}", e);
             }
@@ -114,7 +114,7 @@ impl Postgres {
 
         Ok(Self {
             client,
-            join_handle,
+            _spawned_task,
             relative_path,
             pb,
         })
@@ -222,12 +222,6 @@ fn schema_name(relative_path: &Path) -> String {
         .to_string()
 }
 
-impl Drop for Postgres {
-    fn drop(&mut self) {
-        self.join_handle.abort()
-    }
-}
-
 #[async_trait]
 impl sqllogictest::AsyncDB for Postgres {
     type Error = Error;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org