alamb commented on code in PR #19666:
URL: https://github.com/apache/datafusion/pull/19666#discussion_r2664880603


##########
datafusion/sqllogictest/src/engines/postgres_engine/mod.rs:
##########
@@ -299,8 +297,15 @@ impl sqllogictest::AsyncDB for Postgres {
             self.pb.inc(1);
             return Ok(DBOutput::StatementComplete(0));
         }
+        let statement = self.get_client().prepare(sql).await?;
+        let types: Vec<Type> = statement
+            .columns()
+            .iter()
+            .map(|c| c.type_().clone())
+            .collect();
+
         let start = Instant::now();
-        let rows = self.get_client().query(sql, &[]).await?;
+        let messages = self.get_client().simple_query(sql).await?;

Review Comment:
   drive by cleanup to improve getting types -- use a prepared statement rather 
than running and looking at the first row



-- 
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