zeroshade commented on code in PR #692:
URL: https://github.com/apache/arrow-adbc/pull/692#discussion_r1197963786


##########
c/driver_manager/adbc_driver_manager.cc:
##########
@@ -640,8 +640,8 @@ AdbcStatusCode AdbcLoadDriver(const char* driver_name, 
const char* entrypoint,
   AdbcDriverInitFunc init_func;
   std::string error_message;
 
-  if (version != ADBC_VERSION_1_0_0) {
-    SetError(error, "Only ADBC 1.0.0 is supported");
+  if (version != ADBC_VERSION_1_0_0 && version != ADBC_VERSION_1_1_0) {
+    SetError(error, "Only ADBC 1.0.0 and 1.1.0 are supported");
     return ADBC_STATUS_NOT_IMPLEMENTED;
   }

Review Comment:
   to avoid this becoming a huge thing in the future, should we make this a 
switch with a default? that way future updates would just be to add a new case 
statement to it rather than this if condition just growing ever larger
   
   ie:
   
   ```c++
   switch (version) {
   case ADBC_VERSION_1_0_0:
   case ADBC_VERSION_1_1_0:
       break;
   default:
       SetError(error, "Only ADBC 1.0.0 and 1.1.0 are supported");
       return ADBC_STATUS_NOT_IMPLEMENTED;
   }
   ```



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