From 1e69c15864af30c71618097767b902f8b7a67c1a Mon Sep 17 00:00:00 2001 From: "Alina (Xi) Li" Date: Tue, 26 Aug 2025 15:14:54 -0700 Subject: [PATCH 1/5] Enable ODBC build on Windows Glib & Ruby workflows --- .github/workflows/ruby.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index c56b4a022d8..a5acc1d467a 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -219,6 +219,7 @@ jobs: ARROW_DATASET: ON ARROW_FLIGHT: ON ARROW_FLIGHT_SQL: ON + ARROW_FLIGHT_SQL_ODBC: ON ARROW_GANDIVA: ON ARROW_GCS: ON ARROW_HDFS: OFF @@ -331,6 +332,7 @@ jobs: ARROW_DEPENDENCY_USE_SHARED: OFF ARROW_FLIGHT: ON ARROW_FLIGHT_SQL: ON + ARROW_FLIGHT_SQL_ODBC: ON ARROW_GANDIVA: OFF ARROW_GLIB_VAPI: "false" ARROW_HDFS: OFF From 2261056368490d88ae8d47bac2ce22921f17ec38 Mon Sep 17 00:00:00 2001 From: "Alina (Xi) Li" Date: Tue, 26 Aug 2025 15:17:38 -0700 Subject: [PATCH 2/5] Trigger build (empty commit) From 5cf22576778ef612818746ece641d28b760607f1 Mon Sep 17 00:00:00 2001 From: "Alina (Xi) Li" Date: Tue, 26 Aug 2025 16:14:26 -0700 Subject: [PATCH 3/5] Attempt to fix GLib driver build issues --- .../sql/odbc/flight_sql/flight_sql_statement_get_columns.h | 2 ++ .../sql/odbc/flight_sql/flight_sql_statement_get_type_info.h | 2 ++ cpp/src/arrow/flight/sql/odbc/flight_sql/utils.h | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cpp/src/arrow/flight/sql/odbc/flight_sql/flight_sql_statement_get_columns.h b/cpp/src/arrow/flight/sql/odbc/flight_sql/flight_sql_statement_get_columns.h index 5970bdf1243..fd4f634e157 100644 --- a/cpp/src/arrow/flight/sql/odbc/flight_sql/flight_sql_statement_get_columns.h +++ b/cpp/src/arrow/flight/sql/odbc/flight_sql/flight_sql_statement_get_columns.h @@ -15,6 +15,8 @@ // specific language governing permissions and limitations // under the License. +#pragma once + #include #include "arrow/array/builder_binary.h" #include "arrow/array/builder_primitive.h" diff --git a/cpp/src/arrow/flight/sql/odbc/flight_sql/flight_sql_statement_get_type_info.h b/cpp/src/arrow/flight/sql/odbc/flight_sql/flight_sql_statement_get_type_info.h index 556341fc000..aeb2cfb4264 100644 --- a/cpp/src/arrow/flight/sql/odbc/flight_sql/flight_sql_statement_get_type_info.h +++ b/cpp/src/arrow/flight/sql/odbc/flight_sql/flight_sql_statement_get_type_info.h @@ -15,6 +15,8 @@ // specific language governing permissions and limitations // under the License. +#pragma once + #include #include "arrow/array/builder_binary.h" #include "arrow/array/builder_primitive.h" diff --git a/cpp/src/arrow/flight/sql/odbc/flight_sql/utils.h b/cpp/src/arrow/flight/sql/odbc/flight_sql/utils.h index 8b3e14599a7..58f45c23782 100644 --- a/cpp/src/arrow/flight/sql/odbc/flight_sql/utils.h +++ b/cpp/src/arrow/flight/sql/odbc/flight_sql/utils.h @@ -41,7 +41,7 @@ inline void ThrowIfNotOK(const arrow::Status& status) { template inline bool CheckIfSetToOnlyValidValue(const AttributeTypeT& value, T allowed_value) { - return boost::get(value) == allowed_value; + return ::boost::get(value) == allowed_value; } template From d630e2ae42affd3de435be1d2ed4dd13ff8c792d Mon Sep 17 00:00:00 2001 From: "Alina (Xi) Li" Date: Tue, 26 Aug 2025 16:52:21 -0700 Subject: [PATCH 4/5] Attempt to fix `boost::get` issue on GLib workflow --- cpp/src/arrow/flight/sql/odbc/flight_sql/utils.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cpp/src/arrow/flight/sql/odbc/flight_sql/utils.h b/cpp/src/arrow/flight/sql/odbc/flight_sql/utils.h index 58f45c23782..43ff213c445 100644 --- a/cpp/src/arrow/flight/sql/odbc/flight_sql/utils.h +++ b/cpp/src/arrow/flight/sql/odbc/flight_sql/utils.h @@ -17,7 +17,9 @@ #pragma once +#include #include + #include #include #include @@ -41,7 +43,7 @@ inline void ThrowIfNotOK(const arrow::Status& status) { template inline bool CheckIfSetToOnlyValidValue(const AttributeTypeT& value, T allowed_value) { - return ::boost::get(value) == allowed_value; + return boost::get(value) == allowed_value; } template From 1e90ce2166fde98c0eac06651c02daff753dcbda Mon Sep 17 00:00:00 2001 From: "Alina (Xi) Li" Date: Wed, 27 Aug 2025 12:24:29 -0700 Subject: [PATCH 5/5] Attempt to fix GLib build issue Compile entry_points.cc before odbc_api.cc due to conflict from sql.h and flight/types.h. --- cpp/src/arrow/flight/sql/odbc/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpp/src/arrow/flight/sql/odbc/CMakeLists.txt b/cpp/src/arrow/flight/sql/odbc/CMakeLists.txt index d641873514b..975559c2626 100644 --- a/cpp/src/arrow/flight/sql/odbc/CMakeLists.txt +++ b/cpp/src/arrow/flight/sql/odbc/CMakeLists.txt @@ -61,7 +61,8 @@ set(ODBC_PACKAGE_VERSION_PATCH "0") set(ODBC_PACKAGE_NAME "Apache Arrow Flight SQL ODBC") set(ODBC_PACKAGE_VENDOR "Apache Arrow") -set(ARROW_FLIGHT_SQL_ODBC_SRCS entry_points.cc odbc_api.cc) +# Compile entry_points.cc before odbc_api.cc due to conflict from sql.h and flight/types.h +set(ARROW_FLIGHT_SQL_ODBC_SRCS odbc_api.cc entry_points.cc) if(WIN32) set(VER_FILEVERSION