paleolimbot commented on code in PR #636:
URL: https://github.com/apache/arrow-adbc/pull/636#discussion_r1185106198


##########
c/driver/postgresql/statement.cc:
##########
@@ -797,9 +664,33 @@ AdbcStatusCode PostgresStatement::ExecuteQuery(struct 
ArrowArrayStream* stream,
       PQclear(result);
       return ADBC_STATUS_IO;
     }
-    AdbcStatusCode status = InferSchema(*type_resolver_, result, 
&reader_.schema_, error);
+
+    // Resolve the information from the PGresult into a PostgresType
+    PostgresType root_type;
+    AdbcStatusCode status =
+        ResolvePostgresType(*type_resolver_, result, &root_type, error);
     PQclear(result);
     if (status != ADBC_STATUS_OK) return status;
+
+    // Initialize the copy reader and infer the output schema (i.e., error for
+    // unsupported types before issuing the COPY query)
+    reader_.copy_reader_.reset(new PostgresCopyStreamReader());

Review Comment:
   I asked on the r-lib channel, and as far as anybody knows, the adbc 
Snowflake driver is the first package to ever attempt linking a Go-based static 
library into an R package.



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

Reply via email to