lidavidm commented on code in PR #48577:
URL: https://github.com/apache/arrow/pull/48577#discussion_r2639032954


##########
cpp/src/arrow/flight/sql/odbc/tests/CMakeLists.txt:
##########
@@ -17,8 +17,11 @@
 
 add_custom_target(tests)
 
-find_package(ODBC REQUIRED)
-include_directories(${ODBC_INCLUDE_DIRS})
+if(WIN32)
+  include_directories(${ODBC_INCLUDE_DIRS})
+else()
+  include_directories(${ODBC_INCLUDE_DIR})
+endif()

Review Comment:
   target_include_directories would be preferable...also why is DIRS/DIR 
inconsistent between platforms?



##########
cpp/src/arrow/flight/sql/odbc/odbc_impl/odbc_handle.h:
##########
@@ -46,7 +46,18 @@ class ODBCHandle {
     try {
       GetDiagnostics().Clear();
       rc = function();
-    } catch (const arrow::flight::sql::odbc::DriverException& ex) {
+    } catch (const arrow::flight::sql::odbc::AuthenticationException& ex) {
+      GetDiagnostics().AddError(arrow::flight::sql::odbc::DriverException(
+          ex.GetMessageText(), ex.GetSqlState(), ex.GetNativeError()));
+    } catch (const arrow::flight::sql::odbc::NullWithoutIndicatorException& 
ex) {
+      GetDiagnostics().AddError(arrow::flight::sql::odbc::DriverException(
+          ex.GetMessageText(), ex.GetSqlState(), ex.GetNativeError()));
+    }
+    // on mac, DriverException doesn't catch the subclass exceptions hence we 
added
+    // the following above.
+    // GH-48278 TODO investigate if there is a way to catch all the subclass 
exceptions
+    // under DriverException
+    catch (const arrow::flight::sql::odbc::DriverException& ex) {

Review Comment:
   This shouldn't happen...maybe clang is stricter than MSVC?



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