paleolimbot commented on code in PR #636:
URL: https://github.com/apache/arrow-adbc/pull/636#discussion_r1185061584
##########
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:
The drivers don't use any C++17 features (the tests do, and that's fine).
With Arrow C++11 was a maintenance problem because it needed C++17
features...here using C++17 features are unnecessary.
Many university research clusters still use Centos 7 and don't give users
sufficient privileges to install a sane compiler. R 3.6 will drop off the "last
5 minor versions" support grid in the next year or so and it really does get
used (mostly in IT-managed Windows environments).
--
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]