Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions datafusion-postgres/src/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ impl SimpleQueryHandler for DfSessionService {

let mut results = vec![];
'stmt: for statement in statements {
let query = statement.to_string();

// Call query hooks with the parsed statement
for hook in &self.query_hooks {
if let Some(result) = hook
Expand All @@ -152,6 +150,8 @@ impl SimpleQueryHandler for DfSessionService {
}

let df_result = {
let query = statement.to_string();

let timeout = client::get_statement_timeout(client);
if let Some(timeout_duration) = timeout {
tokio::time::timeout(timeout_duration, self.session_context.sql(&query))
Expand Down
Loading