Skip to content

Commit 7e60e6c

Browse files
committed
Merge remote-tracking branch 'apache/main' into recursive-external-err
2 parents e390b97 + 2db2bb9 commit 7e60e6c

File tree

3 files changed

+13
-16
lines changed

3 files changed

+13
-16
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
55
-->
66

7-
Closes #.
7+
- Closes #.
88

99
## Rationale for this change
1010

datafusion/sqllogictest/src/engines/postgres_engine/mod.rs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717

1818
use async_trait::async_trait;
1919
use bytes::Bytes;
20+
use datafusion_common_runtime::SpawnedTask;
2021
use futures::{SinkExt, StreamExt};
2122
use log::{debug, info};
2223
use sqllogictest::DBOutput;
2324
/// Postgres engine implementation for sqllogictest.
2425
use std::path::{Path, PathBuf};
2526
use std::str::FromStr;
2627
use std::time::Duration;
27-
use tokio::task::JoinHandle;
2828

2929
use super::conversion::*;
3030
use crate::engines::output::{DFColumnType, DFOutput};
@@ -54,7 +54,7 @@ pub type Result<T, E = Error> = std::result::Result<T, E>;
5454

5555
pub struct Postgres {
5656
client: tokio_postgres::Client,
57-
join_handle: JoinHandle<()>,
57+
_spawned_task: SpawnedTask<()>,
5858
/// Relative test file path
5959
relative_path: PathBuf,
6060
pb: ProgressBar,
@@ -90,7 +90,7 @@ impl Postgres {
9090

9191
let (client, connection) = res?;
9292

93-
let join_handle = tokio::spawn(async move {
93+
let _spawned_task = SpawnedTask::spawn(async move {
9494
if let Err(e) = connection.await {
9595
log::error!("Postgres connection error: {:?}", e);
9696
}
@@ -114,7 +114,7 @@ impl Postgres {
114114

115115
Ok(Self {
116116
client,
117-
join_handle,
117+
_spawned_task,
118118
relative_path,
119119
pb,
120120
})
@@ -222,12 +222,6 @@ fn schema_name(relative_path: &Path) -> String {
222222
.to_string()
223223
}
224224

225-
impl Drop for Postgres {
226-
fn drop(&mut self) {
227-
self.join_handle.abort()
228-
}
229-
}
230-
231225
#[async_trait]
232226
impl sqllogictest::AsyncDB for Postgres {
233227
type Error = Error;

datafusion/sqllogictest/test_files/string/string_literal.slt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -862,26 +862,29 @@ true true true true
862862
# Escapes
863863

864864
# \ is an implicit escape character
865-
query BBBB
865+
query BBBBBB
866866
SELECT
867867
'a' LIKE '\%',
868868
'\a' LIKE '\%',
869+
'\a' LIKE '\\%',
869870
'%' LIKE '\%',
870-
'\%' LIKE '\%'
871+
'\%' LIKE '\%',
872+
'\%' LIKE '\\%'
871873
----
872-
false false true false
874+
false false true true false true
873875

874876
# \ is an implicit escape character
875-
query BBBBBB
877+
query BBBBBBB
876878
SELECT
877879
'a' LIKE '\_',
878880
'\a' LIKE '\_',
881+
'\a' LIKE '\\_',
879882
'_' LIKE '\_',
880883
'\_' LIKE '\_',
881884
'abc' LIKE 'a_c',
882885
'abc' LIKE 'a\_c'
883886
----
884-
false false true false true false
887+
false false true true false true false
885888

886889
query BBBB
887890
SELECT

0 commit comments

Comments
 (0)