kou commented on code in PR #40939:
URL: https://github.com/apache/arrow/pull/40939#discussion_r2085794627


##########
cpp/cmake_modules/ThirdpartyToolchain.cmake:
##########
@@ -5562,3 +5563,13 @@ if(ARROW_WITH_AZURE_SDK)
 endif()
 
 message(STATUS "All bundled static libraries: ${ARROW_BUNDLED_STATIC_LIBS}")
+
+# ----------------------------------------------------------------------
+# Apache Flight SQL ODBC
+
+if(ARROW_FLIGHT_SQL_ODBC)
+  find_package(ODBC REQUIRED)
+  if(MSVC)
+    find_package(Boost REQUIRED COMPONENTS locale)

Review Comment:
   Could you do this in `if(ARROW_USE_BOOST)` something like the following?
   
   ```diff
   diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake 
b/cpp/cmake_modules/ThirdpartyToolchain.cmake
   index 7f97fbd6cb..b103fa3183 100644
   --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
   +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
   @@ -1288,6 +1288,9 @@ if(ARROW_USE_BOOST)
      endif()
      if(ARROW_BOOST_REQUIRE_LIBRARY)
        set(ARROW_BOOST_COMPONENTS filesystem system)
   +    if(ARROW_FLIGHT_SQL_ODBC AND MSVC)
   +      list(APPEND ARROW_BOOST_COMPONENTS locale)
   +    endif()
        set(ARROW_BOOST_OPTIONAL_COMPONENTS process)
      else()
        set(ARROW_BOOST_COMPONENTS)
   ```



##########
cpp/src/arrow/flight/sql/odbc/flight_sql/accessors/date_array_accessor.cc:
##########
@@ -0,0 +1,96 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#include "arrow/flight/sql/odbc/flight_sql/accessors/date_array_accessor.h"
+#include <time.h>
+#include "arrow/compute/api.h"

Review Comment:
   It seems that we can remove this.



##########
cpp/cmake_modules/ThirdpartyToolchain.cmake:
##########
@@ -5562,3 +5563,13 @@ if(ARROW_WITH_AZURE_SDK)
 endif()
 
 message(STATUS "All bundled static libraries: ${ARROW_BUNDLED_STATIC_LIBS}")
+
+# ----------------------------------------------------------------------
+# Apache Flight SQL ODBC
+
+if(ARROW_FLIGHT_SQL_ODBC)
+  find_package(ODBC REQUIRED)
+  if(MSVC)
+    find_package(Boost REQUIRED COMPONENTS locale)
+  endif()
+endif()

Review Comment:
   Could you move this before `message(STATUS "All bundled static libraries: 
${ARROW_BUNDLED_STATIC_LIBS}")`?



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to