-
Notifications
You must be signed in to change notification settings - Fork 4k
GH-46522: [C++][FlightRPC] Add Arrow Flight SQL ODBC driver #40939
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
fbb59e1
f795885
b251d50
d85771f
4485696
f7d52d5
0983cb0
bf48db0
0851610
5ec1fdd
e716a08
1691897
dda37df
845131d
31c90bf
faca7ad
c788ba3
f435e15
141e900
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
* Update parquet-testing to match commit from `main` * Address Kou's comments
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -410,7 +410,7 @@ if(ARROW_AZURE) | |
| set(ARROW_WITH_AZURE_SDK ON) | ||
| endif() | ||
|
|
||
| if(ARROW_JSON) | ||
| if(ARROW_JSON OR ARROW_FLIGHT_SQL_ODBC) | ||
| set(ARROW_WITH_RAPIDJSON ON) | ||
| endif() | ||
|
|
||
|
|
@@ -1261,6 +1261,7 @@ endif() | |
| if(ARROW_BUILD_INTEGRATION | ||
| OR ARROW_BUILD_TESTS | ||
| OR (ARROW_FLIGHT AND (ARROW_TESTING OR ARROW_BUILD_BENCHMARKS)) | ||
| OR ARROW_FLIGHT_SQL_ODBC | ||
| OR (ARROW_S3 AND ARROW_BUILD_BENCHMARKS) | ||
| OR (ARROW_TESTING AND ARROW_BUILD_SHARED)) | ||
| set(ARROW_USE_BOOST TRUE) | ||
|
|
@@ -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() | ||
|
||
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -15,28 +15,6 @@ | |||
| # specific language governing permissions and limitations | ||||
| # under the License. | ||||
|
|
||||
| cmake_minimum_required(VERSION 3.16) | ||||
| set(CMAKE_CXX_STANDARD 17) | ||||
|
|
||||
| set(CMAKE_POSITION_INDEPENDENT_CODE ON) | ||||
|
|
||||
| include_directories(include include/flight_sql | ||||
| ${CMAKE_SOURCE_DIR}/odbcabstraction/include) | ||||
|
|
||||
| if(DEFINED CMAKE_TOOLCHAIN_FILE) | ||||
| include(${CMAKE_TOOLCHAIN_FILE}) | ||||
| endif() | ||||
|
|
||||
| find_package(RapidJSON CONFIG REQUIRED) | ||||
|
|
||||
| if(MSVC) | ||||
| # the following definitions stop arrow from using __declspec when statically | ||||
| # linking and will break on Windows without them | ||||
| add_compile_definitions(ARROW_STATIC ARROW_FLIGHT_STATIC) | ||||
| endif() | ||||
|
|
||||
| enable_testing() | ||||
|
|
||||
| add_library(arrow_odbc_spi_impl | ||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you use our arrow/cpp/cmake_modules/BuildUtils.cmake Line 190 in 5989387
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have an upcoming PR#46099 that uses
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, I may misunderstand your comment... What will be focused in #46099? Will #46099 focus on replacing
Could you explain why |
||||
| include/flight_sql/flight_sql_driver.h | ||||
| accessors/binary_array_accessor.cc | ||||
|
|
@@ -99,6 +77,9 @@ add_library(arrow_odbc_spi_impl | |||
| system_trust_store.cc | ||||
| system_trust_store.h | ||||
| utils.cc) | ||||
| target_include_directories(arrow_odbc_spi_impl | ||||
| PUBLIC include include/flight_sql | ||||
| ${CMAKE_SOURCE_DIR}/odbcabstraction/include) | ||||
| target_include_directories(arrow_odbc_spi_impl PUBLIC ${CMAKE_CURRENT_LIST_DIR}) | ||||
|
|
||||
| if(WIN32) | ||||
|
|
@@ -118,23 +99,9 @@ if(WIN32) | |||
| system_dsn.cc) | ||||
| endif() | ||||
|
|
||||
| find_package(ArrowFlightSql) | ||||
|
|
||||
| target_link_libraries(arrow_odbc_spi_impl PUBLIC odbcabstraction arrow_flight_sql_shared) | ||||
|
|
||||
| if(MSVC) | ||||
| set(CMAKE_CXX_FLAGS_RELEASE "/MD") | ||||
| set(CMAKE_CXX_FLAGS_DEBUG "/MDd") | ||||
| # else | ||||
| # target_link_libraries(arrow_odbc_spi_impl PUBLIC ArrowFlightSql::arrow_flight_sql_static) | ||||
| endif() | ||||
|
|
||||
| # set(ARROW_ODBC_SPI_THIRDPARTY_LIBS | ||||
| # ${ARROW_LIBS} gRPC::grpc++ ${ZLIB_LIBRARIES} ${Protobuf_LIBRARIES} | ||||
| # ${OPENSSL_LIBRARIES} ${RapidJSON_LIBRARIES}) | ||||
|
|
||||
| if(MSVC) | ||||
| find_package(Boost REQUIRED COMPONENTS locale) | ||||
| target_link_libraries(arrow_odbc_spi_impl PUBLIC Boost::locale) | ||||
| endif() | ||||
|
|
||||
|
|
@@ -146,9 +113,6 @@ set_target_properties(arrow_odbc_spi_impl | |||
| RUNTIME_OUTPUT_DIRECTORY | ||||
| ${CMAKE_BINARY_DIR}/$<CONFIG>/lib) | ||||
|
Comment on lines
+108
to
+114
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We may be able to remove this by
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See #40939 (comment) |
||||
|
|
||||
| # target_include_directories(arrow_odbc_spi_impl | ||||
| # PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) | ||||
|
|
||||
| # CLI | ||||
| add_executable(arrow_odbc_spi_impl_cli main.cc) | ||||
| set_target_properties(arrow_odbc_spi_impl_cli | ||||
|
|
||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to restore the submodule
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup gonna do that.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is too old of a commit, can we make sure it's up to date with main?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let me fix this
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it should be resolved now |
| +1 −1 | bad_data/README.md | |
| +4 −2 | data/README.md | |
| + − | data/page_v2_empty_compressed.parquet | |
| + − | data/unknown-logical-type.parquet |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,8 +15,8 @@ | |
| ] | ||
| }, | ||
| "benchmark", | ||
| "boost-cmake", | ||
| "boost-beast", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you keep this list in alphabetical order?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed |
||
| "boost-cmake", | ||
| "boost-crc", | ||
| "boost-filesystem", | ||
| "boost-locale", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you do this in
if(ARROW_USE_BOOST)something like the following?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, updated the code