paleolimbot commented on code in PR #636:
URL: https://github.com/apache/arrow-adbc/pull/636#discussion_r1185093113
##########
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 think the schedule is every few months and they just released 4.3 (which
knocked R 3.5 into unsupported territory). In Arrow and when writing tests
C++17 is definitely helpful...in the case where you're wrapping a C API (e.g.,
this, MSSQL, sqlite), C++11 is more than enough.
Go drivers are even worse since they can't go on CRAN without a potentially
year(s)-long battle to get CRAN to install go on its build machines (rust is
fine, though). You can choose not to support CRAN but unless these drivers are
much faster than ~ODBC~ the existing libpq/postgres/R connector, nobody will
install them (this driver is not currently faster than ~ODBC~ the existing
connector in R). Snowflake and FlightSQL work well in Go because there is no
other way to access those platforms otherwise.
--
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]