lidavidm commented on code in PR #1058:
URL: https://github.com/apache/arrow-adbc/pull/1058#discussion_r1327470933
##########
c/validation/adbc_validation_util.h:
##########
@@ -407,7 +407,6 @@ void CompareSchema(
/// \brief Helper method to get the vendor version of a driver
/// Sets error on failure
Review Comment:
```suggestion
```
##########
c/validation/adbc_validation_util.cc:
##########
@@ -242,14 +242,18 @@ void CompareSchema(
}
}
-std::string GetDriverVendorVersion(struct AdbcConnection* connection,
- struct AdbcError* error) {
+std::string GetDriverVendorVersion(struct AdbcConnection* connection) {
const uint32_t info_code = ADBC_INFO_VENDOR_VERSION;
const uint32_t info[] = {info_code};
adbc_validation::StreamReader reader;
- AdbcConnectionGetInfo(connection, info, 1, &reader.stream.value, error),
+ struct AdbcError error = ADBC_ERROR_INIT;
+ AdbcConnectionGetInfo(connection, info, 1, &reader.stream.value, &error),
reader.GetSchema();
+ if (error.private_data != nullptr) {
+ throw std::runtime_error("error occured calling AdbcConnectionGetInfo!");
Review Comment:
```suggestion
if (error.release) error.release(&error);
throw std::runtime_error("error occured calling AdbcConnectionGetInfo!");
```
or just use a nullptr `error` (which should always be allowed)
--
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]