diff --git a/cpp/src/flightsql_odbc/flightsql-odbc/CMakeLists.txt b/cpp/src/flightsql_odbc/flightsql-odbc/CMakeLists.txt index cd7966fac61d7..2f8ff5216c0cc 100644 --- a/cpp/src/flightsql_odbc/flightsql-odbc/CMakeLists.txt +++ b/cpp/src/flightsql_odbc/flightsql-odbc/CMakeLists.txt @@ -4,7 +4,7 @@ # cmake_minimum_required(VERSION 3.11) -set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD 17) project(flightsql_odbc) diff --git a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/CMakeLists.txt b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/CMakeLists.txt index c2fb049d29db9..50b41f9918479 100644 --- a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/CMakeLists.txt +++ b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/CMakeLists.txt @@ -4,7 +4,7 @@ # cmake_minimum_required(VERSION 3.11) -set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_POSITION_INDEPENDENT_CODE ON) @@ -115,7 +115,7 @@ endif() # If build fails, need to remove build folder to re-build. set(ARROW_GIT_REPOSITORY "https://github.com/apache/arrow.git" CACHE STRING "Arrow repository path or URL") -set(ARROW_GIT_TAG "b050bd0d31db6412256cec3362c0d57c9732e1f2" CACHE STRING "Tag for the Arrow repository") +set(ARROW_GIT_TAG "apache-arrow-14.0.1" CACHE STRING "Tag for the Arrow repository") message("Using Arrow from ${ARROW_GIT_REPOSITORY} on tag ${ARROW_GIT_TAG}") ExternalProject_Add( @@ -134,7 +134,7 @@ link_directories(${CMAKE_CURRENT_BINARY_DIR}/ApacheArrow-prefix/src/ApacheArrow- if (MSVC) # the following definitions stop arrow from using __declspec when staticly linking and will break on windows without them - add_compile_definitions(ARROW_STATIC ARROW_FLIGHT_STATIC) + add_compile_definitions(ARROW_STATIC ARROW_FLIGHT_STATIC ARROW_FLIGHT_SQL_STATIC) endif() enable_testing() diff --git a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_auth_method.cc b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_auth_method.cc index ac4ae67eddfbe..ad49259f03158 100644 --- a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_auth_method.cc +++ b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_auth_method.cc @@ -66,10 +66,10 @@ class UserPasswordAuthMethod : public FlightSqlAuthMethod { FlightCallOptions auth_call_options; const boost::optional<Connection::Attribute> &login_timeout = connection.GetAttribute(Connection::LOGIN_TIMEOUT); - if (login_timeout && boost::get<uint32_t>(*login_timeout) > 0) { + if (login_timeout && std::get<uint32_t>(*login_timeout) > 0) { // ODBC's LOGIN_TIMEOUT attribute and FlightCallOptions.timeout use // seconds as time unit. - double timeout_seconds = static_cast<double>(boost::get<uint32_t>(*login_timeout)); + double timeout_seconds = static_cast<double>(std::get<uint32_t>(*login_timeout)); if (timeout_seconds > 0) { auth_call_options.timeout = TimeoutDuration{timeout_seconds}; } diff --git a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_connection.cc b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_connection.cc index d0b62888dec74..eaa5bb18ebed9 100644 --- a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_connection.cc +++ b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_connection.cc @@ -174,7 +174,7 @@ void FlightSqlConnection::Connect(const ConnPropertyMap &properties, std::unique_ptr<FlightClient> flight_client; ThrowIfNotOK( - FlightClient::Connect(location, client_options, &flight_client)); + FlightClient::Connect(location, client_options).Value(&flight_client)); std::unique_ptr<FlightSqlAuthMethod> auth_method = FlightSqlAuthMethod::FromProperties(flight_client, properties); @@ -251,9 +251,9 @@ FlightSqlConnection::PopulateCallOptions(const ConnPropertyMap &props) { // is the first request. const boost::optional<Connection::Attribute> &connection_timeout = closed_ ? GetAttribute(LOGIN_TIMEOUT) : GetAttribute(CONNECTION_TIMEOUT); - if (connection_timeout && boost::get<uint32_t>(*connection_timeout) > 0) { + if (connection_timeout && std::get<uint32_t>(*connection_timeout) > 0) { call_options_.timeout = - TimeoutDuration{static_cast<double>(boost::get<uint32_t>(*connection_timeout))}; + TimeoutDuration{static_cast<double>(std::get<uint32_t>(*connection_timeout))}; } for (auto prop : props) { @@ -342,7 +342,7 @@ FlightSqlConnection::BuildLocation(const ConnPropertyMap &properties, operation_result = address_info.GetAddressInfo(host, host_name_info, NI_MAXHOST); if (operation_result) { - ThrowIfNotOK(Location::ForGrpcTls(host_name_info, port, &location)); + ThrowIfNotOK(Location::ForGrpcTls(host_name_info, port).Value(&location)); return location; } // TODO: We should log that we could not convert an IP to hostname here. @@ -353,11 +353,11 @@ FlightSqlConnection::BuildLocation(const ConnPropertyMap &properties, // if it is not an IP. } - ThrowIfNotOK(Location::ForGrpcTls(host, port, &location)); + ThrowIfNotOK(Location::ForGrpcTls(host, port).Value(&location)); return location; } - ThrowIfNotOK(Location::ForGrpcTcp(host, port, &location)); + ThrowIfNotOK(Location::ForGrpcTcp(host, port).Value(&location)); return location; } @@ -415,7 +415,7 @@ Connection::Info FlightSqlConnection::GetInfo(uint16_t info_type) { if (info_type == SQL_DBMS_NAME || info_type == SQL_SERVER_NAME) { // Update the database component reported in error messages. // We do this lazily for performance reasons. - diagnostics_.SetDataSourceComponent(boost::get<std::string>(result)); + diagnostics_.SetDataSourceComponent(std::get<std::string>(result)); } return result; } diff --git a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_connection_test.cc b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_connection_test.cc index 9369f007e7c43..395cae007d320 100644 --- a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_connection_test.cc +++ b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_connection_test.cc @@ -28,7 +28,7 @@ TEST(AttributeTests, SetAndGetAttribute) { EXPECT_TRUE(firstValue); - EXPECT_EQ(boost::get<uint32_t>(*firstValue), static_cast<uint32_t>(200)); + EXPECT_EQ(std::get<uint32_t>(*firstValue), static_cast<uint32_t>(200)); connection.SetAttribute(Connection::CONNECTION_TIMEOUT, static_cast<uint32_t>(300)); @@ -36,7 +36,7 @@ TEST(AttributeTests, SetAndGetAttribute) { connection.GetAttribute(Connection::CONNECTION_TIMEOUT); EXPECT_TRUE(changeValue); - EXPECT_EQ(boost::get<uint32_t>(*changeValue), static_cast<uint32_t>(300)); + EXPECT_EQ(std::get<uint32_t>(*changeValue), static_cast<uint32_t>(300)); connection.Close(); } @@ -48,7 +48,7 @@ TEST(AttributeTests, GetAttributeWithoutSetting) { connection.GetAttribute(Connection::CONNECTION_TIMEOUT); connection.SetClosed(false); - EXPECT_EQ(0, boost::get<uint32_t>(*optional)); + EXPECT_EQ(0, std::get<uint32_t>(*optional)); connection.Close(); } @@ -113,7 +113,7 @@ TEST(BuildLocationTests, ForTcp) { Location expected_location; ASSERT_TRUE( - Location::ForGrpcTcp("localhost", 32010, &expected_location).ok()); + Location::ForGrpcTcp("localhost", 32010).Value(&expected_location).ok()); ASSERT_EQ(expected_location, actual_location1); ASSERT_NE(expected_location, actual_location2); } @@ -146,7 +146,7 @@ TEST(BuildLocationTests, ForTls) { Location expected_location; ASSERT_TRUE( - Location::ForGrpcTls("localhost", 32010, &expected_location).ok()); + Location::ForGrpcTls("localhost", 32010).Value(&expected_location).ok()); ASSERT_EQ(expected_location, actual_location1); ASSERT_NE(expected_location, actual_location2); } diff --git a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_get_tables_reader.cc b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_get_tables_reader.cc index e6b01293e9ca9..f041f74b416c1 100644 --- a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_get_tables_reader.cc +++ b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_get_tables_reader.cc @@ -18,7 +18,7 @@ namespace driver { namespace flight_sql { using arrow::internal::checked_pointer_cast; -using arrow::util::nullopt; +using std::nullopt; GetTablesReader::GetTablesReader(std::shared_ptr<RecordBatch> record_batch) : record_batch_(std::move(record_batch)), current_row_(-1) {} diff --git a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_get_tables_reader.h b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_get_tables_reader.h index 0e10c1e5ee39e..05e4a24f2047c 100644 --- a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_get_tables_reader.h +++ b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_get_tables_reader.h @@ -5,13 +5,12 @@ */ #include "record_batch_transformer.h" -#include <arrow/util/optional.h> namespace driver { namespace flight_sql { using namespace arrow; -using arrow::util::optional; +using std::optional; class GetTablesReader { private: diff --git a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_get_type_info_reader.cc b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_get_type_info_reader.cc index 6907c501a6f72..97c7f6e8b3af7 100644 --- a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_get_type_info_reader.cc +++ b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_get_type_info_reader.cc @@ -16,7 +16,7 @@ namespace driver { namespace flight_sql { using arrow::internal::checked_pointer_cast; -using arrow::util::nullopt; +using std::nullopt; GetTypeInfoReader::GetTypeInfoReader(std::shared_ptr<RecordBatch> record_batch) : record_batch_(std::move(record_batch)), current_row_(-1) {} diff --git a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_get_type_info_reader.h b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_get_type_info_reader.h index 78729d763a34d..4b954b3b925ed 100644 --- a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_get_type_info_reader.h +++ b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_get_type_info_reader.h @@ -4,14 +4,15 @@ * See "LICENSE" for license information. */ +#include <optional> + #include "record_batch_transformer.h" -#include <arrow/util/optional.h> namespace driver { namespace flight_sql { using namespace arrow; -using arrow::util::optional; +using std::optional; class GetTypeInfoReader { private: diff --git a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_result_set.cc b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_result_set.cc index 42fbf4352d4c5..c3495eaeb0701 100644 --- a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_result_set.cc +++ b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_result_set.cc @@ -51,7 +51,7 @@ FlightSqlResultSet::FlightSqlResultSet( if (transformer_) { schema_ = transformer_->GetTransformedSchema(); } else { - ThrowIfNotOK(flight_info->GetSchema(nullptr, &schema_)); + ThrowIfNotOK(flight_info->GetSchema(nullptr).Value(&schema_)); } for (size_t i = 0; i < columns_.size(); ++i) { diff --git a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_result_set_metadata.cc b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_result_set_metadata.cc index 8188b36045f69..3823fab6a6081 100644 --- a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_result_set_metadata.cc +++ b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_result_set_metadata.cc @@ -20,8 +20,8 @@ namespace flight_sql { using namespace odbcabstraction; using arrow::DataType; using arrow::Field; -using arrow::util::make_optional; -using arrow::util::nullopt; +using std::make_optional; +using std::nullopt; constexpr int32_t DefaultDecimalPrecision = 38; @@ -251,7 +251,7 @@ FlightSqlResultSetMetadata::FlightSqlResultSetMetadata( metadata_settings_(metadata_settings){ arrow::ipc::DictionaryMemo dict_memo; - ThrowIfNotOK(flight_info->GetSchema(&dict_memo, &schema_)); + ThrowIfNotOK(flight_info->GetSchema(&dict_memo).Value(&schema_)); } } // namespace flight_sql diff --git a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_statement.cc b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_statement.cc index 943a35589c6ad..859b0944e2eda 100644 --- a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_statement.cc +++ b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_statement.cc @@ -75,9 +75,9 @@ bool FlightSqlStatement::SetAttribute(StatementAttributeId attribute, case MAX_LENGTH: return CheckIfSetToOnlyValidValue(value, static_cast<size_t>(0)); case QUERY_TIMEOUT: - if (boost::get<size_t>(value) > 0) { + if (std::get<size_t>(value) > 0) { call_options_.timeout = - TimeoutDuration{static_cast<double>(boost::get<size_t>(value))}; + TimeoutDuration{static_cast<double>(std::get<size_t>(value))}; } else { call_options_.timeout = TimeoutDuration{-1}; // Intentional fall-through. diff --git a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_statement_get_columns.cc b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_statement_get_columns.cc index 49994eb1e95c4..93cc067aa06f6 100644 --- a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_statement_get_columns.cc +++ b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_statement_get_columns.cc @@ -15,9 +15,9 @@ namespace driver { namespace flight_sql { using arrow::flight::sql::ColumnMetadata; -using arrow::util::make_optional; -using arrow::util::nullopt; -using arrow::util::optional; +using std::make_optional; +using std::nullopt; +using std::optional; namespace { std::shared_ptr<Schema> GetColumns_V3_Schema() { diff --git a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_statement_get_columns.h b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_statement_get_columns.h index d5bbc47752689..9110078665f46 100644 --- a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_statement_get_columns.h +++ b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_statement_get_columns.h @@ -4,18 +4,19 @@ * See "LICENSE" for license information. */ +#include <optional> + #include "record_batch_transformer.h" #include <arrow/array/builder_binary.h> #include <arrow/array/builder_primitive.h> #include <arrow/status.h> -#include <arrow/util/optional.h> #include <odbcabstraction/types.h> namespace driver { namespace flight_sql { using odbcabstraction::MetadataSettings; -using arrow::util::optional; +using std::optional; class GetColumns_RecordBatchBuilder { private: diff --git a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_statement_get_tables.cc b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_statement_get_tables.cc index 1536a13a8bd09..687a38d6e7920 100644 --- a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_statement_get_tables.cc +++ b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_statement_get_tables.cc @@ -76,7 +76,7 @@ GetTablesForSQLAllCatalogs(const ColumnNames &names, ThrowIfNotOK(result.status()); flight_info = result.ValueOrDie(); - ThrowIfNotOK(flight_info->GetSchema(nullptr, &schema)); + ThrowIfNotOK(flight_info->GetSchema(nullptr).Value(&schema)); auto transformer = RecordBatchTransformerWithTasksBuilder(schema) .RenameField("catalog_name", names.catalog_column) @@ -102,7 +102,7 @@ std::shared_ptr<ResultSet> GetTablesForSQLAllDbSchemas( ThrowIfNotOK(result.status()); flight_info = result.ValueOrDie(); - ThrowIfNotOK(flight_info->GetSchema(nullptr, &schema)); + ThrowIfNotOK(flight_info->GetSchema(nullptr).Value(&schema)); auto transformer = RecordBatchTransformerWithTasksBuilder(schema) .AddFieldOfNulls(names.catalog_column, utf8()) @@ -130,7 +130,7 @@ GetTablesForSQLAllTableTypes(const ColumnNames &names, ThrowIfNotOK(result.status()); flight_info = result.ValueOrDie(); - ThrowIfNotOK(flight_info->GetSchema(nullptr, &schema)); + ThrowIfNotOK(flight_info->GetSchema(nullptr).Value(&schema)); auto transformer = RecordBatchTransformerWithTasksBuilder(schema) .AddFieldOfNulls(names.catalog_column, utf8()) @@ -158,7 +158,7 @@ std::shared_ptr<ResultSet> GetTablesForGenericUse( ThrowIfNotOK(result.status()); flight_info = result.ValueOrDie(); - ThrowIfNotOK(flight_info->GetSchema(nullptr, &schema)); + ThrowIfNotOK(flight_info->GetSchema(nullptr).Value(&schema)); auto transformer = RecordBatchTransformerWithTasksBuilder(schema) .RenameField("catalog_name", names.catalog_column) diff --git a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_statement_get_type_info.cc b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_statement_get_type_info.cc index 8679c6dc6945c..402660c5f94f3 100644 --- a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_statement_get_type_info.cc +++ b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_statement_get_type_info.cc @@ -14,9 +14,9 @@ namespace driver { namespace flight_sql { -using arrow::util::make_optional; -using arrow::util::nullopt; -using arrow::util::optional; +using std::make_optional; +using std::nullopt; +using std::optional; namespace { std::shared_ptr<Schema> GetTypeInfo_V3_Schema() { diff --git a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_statement_get_type_info.h b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_statement_get_type_info.h index 5b94c14319c3b..41ed769631a83 100644 --- a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_statement_get_type_info.h +++ b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/flight_sql_statement_get_type_info.h @@ -4,18 +4,19 @@ * See "LICENSE" for license information. */ +#include <optional> + #include "record_batch_transformer.h" #include <arrow/array/builder_binary.h> #include <arrow/array/builder_primitive.h> #include <arrow/status.h> -#include <arrow/util/optional.h> #include <odbcabstraction/types.h> namespace driver { namespace flight_sql { using odbcabstraction::MetadataSettings; -using arrow::util::optional; +using std::optional; class GetTypeInfo_RecordBatchBuilder { private: diff --git a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/get_info_cache.cc b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/get_info_cache.cc index b87ab94553c14..a1d5899932ea3 100644 --- a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/get_info_cache.cc +++ b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/get_info_cache.cc @@ -168,15 +168,15 @@ uint32_t GetCvtBitForArrowConvertEntry(int32_t convert_entry) { } inline int32_t ScalarToInt32(arrow::UnionScalar *scalar) { - return reinterpret_cast<arrow::Int32Scalar *>(scalar->value.get())->value; + return reinterpret_cast<arrow::Int32Scalar *>(scalar->child_value().get())->value; } inline int64_t ScalarToInt64(arrow::UnionScalar *scalar) { - return reinterpret_cast<arrow::Int64Scalar *>(scalar->value.get())->value; + return reinterpret_cast<arrow::Int64Scalar *>(scalar->child_value().get())->value; } inline std::string ScalarToBoolString(arrow::UnionScalar *scalar) { - return reinterpret_cast<arrow::BooleanScalar *>(scalar->value.get())->value ? "Y" : "N"; + return reinterpret_cast<arrow::BooleanScalar *>(scalar->child_value().get())->value ? "Y" : "N"; } inline void SetDefaultIfMissing(std::unordered_map<uint16_t, driver::odbcabstraction::Connection::Info>& cache, @@ -310,7 +310,7 @@ bool GetInfoCache::LoadInfoFromServer() { switch (info_type) { // String properties case SqlInfoOptions::FLIGHT_SQL_SERVER_NAME: { - std::string server_name(reinterpret_cast<arrow::StringScalar*>(scalar->value.get())->view()); + std::string server_name(reinterpret_cast<arrow::StringScalar*>(scalar->child_value().get())->view()); // TODO: Consider creating different properties in GetSqlInfo. // TODO: Investigate if SQL_SERVER_NAME should just be the host @@ -325,7 +325,7 @@ bool GetInfoCache::LoadInfoFromServer() { } case SqlInfoOptions::FLIGHT_SQL_SERVER_VERSION: { info_[SQL_DBMS_VER] = ConvertToDBMSVer( - std::string(reinterpret_cast<arrow::StringScalar*>(scalar->value.get())->view())); + std::string(reinterpret_cast<arrow::StringScalar*>(scalar->child_value().get())->view())); break; } case SqlInfoOptions::FLIGHT_SQL_SERVER_ARROW_VERSION: { @@ -333,27 +333,27 @@ bool GetInfoCache::LoadInfoFromServer() { break; } case SqlInfoOptions::SQL_SEARCH_STRING_ESCAPE: { - info_[SQL_SEARCH_PATTERN_ESCAPE] = std::string(reinterpret_cast<arrow::StringScalar*>(scalar->value.get())->view()); + info_[SQL_SEARCH_PATTERN_ESCAPE] = std::string(reinterpret_cast<arrow::StringScalar*>(scalar->child_value().get())->view()); break; } case ARROW_SQL_IDENTIFIER_QUOTE_CHAR: { - info_[SQL_IDENTIFIER_QUOTE_CHAR] = std::string(reinterpret_cast<arrow::StringScalar*>(scalar->value.get())->view()); + info_[SQL_IDENTIFIER_QUOTE_CHAR] = std::string(reinterpret_cast<arrow::StringScalar*>(scalar->child_value().get())->view()); break; } case SqlInfoOptions::SQL_EXTRA_NAME_CHARACTERS: { - info_[SQL_SPECIAL_CHARACTERS] = std::string(reinterpret_cast<arrow::StringScalar*>(scalar->value.get())->view()); + info_[SQL_SPECIAL_CHARACTERS] = std::string(reinterpret_cast<arrow::StringScalar*>(scalar->child_value().get())->view()); break; } case ARROW_SQL_SCHEMA_TERM: { - info_[SQL_SCHEMA_TERM] = std::string(reinterpret_cast<arrow::StringScalar*>(scalar->value.get())->view()); + info_[SQL_SCHEMA_TERM] = std::string(reinterpret_cast<arrow::StringScalar*>(scalar->child_value().get())->view()); break; } case ARROW_SQL_PROCEDURE_TERM: { - info_[SQL_PROCEDURE_TERM] = std::string(reinterpret_cast<arrow::StringScalar*>(scalar->value.get())->view()); + info_[SQL_PROCEDURE_TERM] = std::string(reinterpret_cast<arrow::StringScalar*>(scalar->child_value().get())->view()); break; } case ARROW_SQL_CATALOG_TERM: { - std::string catalog_term(std::string(reinterpret_cast<arrow::StringScalar*>(scalar->value.get())->view())); + std::string catalog_term(std::string(reinterpret_cast<arrow::StringScalar*>(scalar->child_value().get())->view())); if (catalog_term.empty()) { info_[SQL_CATALOG_NAME] = "N"; info_[SQL_CATALOG_NAME_SEPARATOR] = ""; @@ -363,7 +363,7 @@ bool GetInfoCache::LoadInfoFromServer() { info_[SQL_CATALOG_NAME_SEPARATOR] = "."; info_[SQL_CATALOG_LOCATION] = static_cast<uint16_t>(SQL_CL_START); } - info_[SQL_CATALOG_TERM] = std::string(reinterpret_cast<arrow::StringScalar*>(scalar->value.get())->view()); + info_[SQL_CATALOG_TERM] = std::string(reinterpret_cast<arrow::StringScalar*>(scalar->child_value().get())->view()); break; } @@ -384,7 +384,7 @@ bool GetInfoCache::LoadInfoFromServer() { break; case SqlInfoOptions::SQL_DDL_SCHEMA: { bool supports_schema_ddl = - reinterpret_cast<arrow::BooleanScalar *>(scalar->value.get())->value; + reinterpret_cast<arrow::BooleanScalar *>(scalar->child_value().get())->value; // Note: this is a bitmask and we can't describe cascade or restrict // flags. info_[SQL_DROP_SCHEMA] = static_cast<uint32_t>(SQL_DS_DROP_SCHEMA); @@ -397,7 +397,7 @@ bool GetInfoCache::LoadInfoFromServer() { } case SqlInfoOptions::SQL_DDL_TABLE: { bool supports_table_ddl = - reinterpret_cast<arrow::BooleanScalar *>(scalar->value.get())->value; + reinterpret_cast<arrow::BooleanScalar *>(scalar->child_value().get())->value; // This is a bitmask and we cannot describe all clauses. info_[SQL_CREATE_TABLE] = static_cast<uint32_t>(SQL_CT_CREATE_TABLE); @@ -414,7 +414,7 @@ bool GetInfoCache::LoadInfoFromServer() { } case SqlInfoOptions::SQL_NULL_PLUS_NULL_IS_NULL: { info_[SQL_CONCAT_NULL_BEHAVIOR] = static_cast<uint16_t>( - reinterpret_cast<arrow::BooleanScalar *>(scalar->value.get())->value + reinterpret_cast<arrow::BooleanScalar *>(scalar->child_value().get())->value ? SQL_CB_NULL : SQL_CB_NON_NULL); break; @@ -424,7 +424,7 @@ bool GetInfoCache::LoadInfoFromServer() { // SQL_SUPPORTS_DIFFERENT_TABLE_CORRELATION_NAMES since we need both // properties to determine the value for SQL_CORRELATION_NAME. supports_correlation_name = - reinterpret_cast<arrow::BooleanScalar *>(scalar->value.get())->value; + reinterpret_cast<arrow::BooleanScalar *>(scalar->child_value().get())->value; break; } case SqlInfoOptions::SQL_SUPPORTS_DIFFERENT_TABLE_CORRELATION_NAMES: { @@ -432,7 +432,7 @@ bool GetInfoCache::LoadInfoFromServer() { // SQL_SUPPORTS_DIFFERENT_TABLE_CORRELATION_NAMES since we need both // properties to determine the value for SQL_CORRELATION_NAME. requires_different_correlation_name = - reinterpret_cast<arrow::BooleanScalar *>(scalar->value.get())->value; + reinterpret_cast<arrow::BooleanScalar *>(scalar->child_value().get())->value; break; } case SqlInfoOptions::SQL_SUPPORTS_EXPRESSIONS_IN_ORDER_BY: { @@ -442,7 +442,7 @@ bool GetInfoCache::LoadInfoFromServer() { case SqlInfoOptions::SQL_SUPPORTS_ORDER_BY_UNRELATED: { // Note: this is the negation of the Flight SQL property. info_[SQL_ORDER_BY_COLUMNS_IN_SELECT] = - reinterpret_cast<arrow::BooleanScalar *>(scalar->value.get())->value ? "N" + reinterpret_cast<arrow::BooleanScalar *>(scalar->child_value().get())->value ? "N" : "Y"; break; } @@ -452,7 +452,7 @@ bool GetInfoCache::LoadInfoFromServer() { } case SqlInfoOptions::SQL_SUPPORTS_NON_NULLABLE_COLUMNS: { info_[SQL_NON_NULLABLE_COLUMNS] = static_cast<uint16_t>( - reinterpret_cast<arrow::BooleanScalar *>(scalar->value.get())->value + reinterpret_cast<arrow::BooleanScalar *>(scalar->child_value().get())->value ? SQL_NNC_NON_NULL : SQL_NNC_NULL); break; @@ -463,7 +463,7 @@ bool GetInfoCache::LoadInfoFromServer() { } case SqlInfoOptions::SQL_CATALOG_AT_START: { info_[SQL_CATALOG_LOCATION] = static_cast<uint16_t>( - reinterpret_cast<arrow::BooleanScalar *>(scalar->value.get())->value + reinterpret_cast<arrow::BooleanScalar *>(scalar->child_value().get())->value ? SQL_CL_START : SQL_CL_END); break; @@ -481,22 +481,22 @@ bool GetInfoCache::LoadInfoFromServer() { } case SqlInfoOptions::SQL_TRANSACTIONS_SUPPORTED: { transactions_supported = - reinterpret_cast<arrow::BooleanScalar *>(scalar->value.get())->value; + reinterpret_cast<arrow::BooleanScalar *>(scalar->child_value().get())->value; break; } case SqlInfoOptions::SQL_DATA_DEFINITION_CAUSES_TRANSACTION_COMMIT: { transaction_ddl_commit = - reinterpret_cast<arrow::BooleanScalar *>(scalar->value.get())->value; + reinterpret_cast<arrow::BooleanScalar *>(scalar->child_value().get())->value; break; } case SqlInfoOptions::SQL_DATA_DEFINITIONS_IN_TRANSACTIONS_IGNORED: { transaction_ddl_ignore = - reinterpret_cast<arrow::BooleanScalar *>(scalar->value.get())->value; + reinterpret_cast<arrow::BooleanScalar *>(scalar->child_value().get())->value; break; } case SqlInfoOptions::SQL_BATCH_UPDATES_SUPPORTED: { info_[SQL_BATCH_SUPPORT] = static_cast<uint32_t>( - reinterpret_cast<arrow::BooleanScalar *>(scalar->value.get())->value + reinterpret_cast<arrow::BooleanScalar *>(scalar->child_value().get())->value ? SQL_BS_ROW_COUNT_EXPLICIT : 0); break; @@ -936,7 +936,7 @@ bool GetInfoCache::LoadInfoFromServer() { // List<string> properties case ARROW_SQL_NUMERIC_FUNCTIONS: { std::shared_ptr<arrow::Array> list_value = - reinterpret_cast<arrow::BaseListScalar*>(scalar->value.get())->value; + reinterpret_cast<arrow::BaseListScalar*>(scalar->child_value().get())->value; uint32_t result_val = 0; for (int64_t list_index = 0; list_index < list_value->length(); ++list_index) { @@ -953,7 +953,7 @@ bool GetInfoCache::LoadInfoFromServer() { case ARROW_SQL_STRING_FUNCTIONS: { std::shared_ptr<arrow::Array> list_value = - reinterpret_cast<arrow::BaseListScalar*>(scalar->value.get())->value; + reinterpret_cast<arrow::BaseListScalar*>(scalar->child_value().get())->value; uint32_t result_val = 0; for (int64_t list_index = 0; list_index < list_value->length(); ++list_index) { @@ -969,7 +969,7 @@ bool GetInfoCache::LoadInfoFromServer() { } case ARROW_SQL_SYSTEM_FUNCTIONS: { std::shared_ptr<arrow::Array> list_value = - reinterpret_cast<arrow::BaseListScalar*>(scalar->value.get())->value; + reinterpret_cast<arrow::BaseListScalar*>(scalar->child_value().get())->value; uint32_t sys_result = 0; uint32_t convert_result = 0; for (int64_t list_index = 0; list_index < list_value->length(); @@ -987,7 +987,7 @@ bool GetInfoCache::LoadInfoFromServer() { } case SqlInfoOptions::SQL_DATETIME_FUNCTIONS: { std::shared_ptr<arrow::Array> list_value = - reinterpret_cast<arrow::BaseListScalar*>(scalar->value.get())->value; + reinterpret_cast<arrow::BaseListScalar*>(scalar->child_value().get())->value; uint32_t result_val = 0; for (int64_t list_index = 0; list_index < list_value->length(); ++list_index) { @@ -1004,7 +1004,7 @@ bool GetInfoCache::LoadInfoFromServer() { case ARROW_SQL_KEYWORDS: { std::shared_ptr<arrow::Array> list_value = - reinterpret_cast<arrow::BaseListScalar*>(scalar->value.get())->value; + reinterpret_cast<arrow::BaseListScalar*>(scalar->child_value().get())->value; std::string result_str; for (int64_t list_index = 0; list_index < list_value->length(); ++list_index) { @@ -1024,7 +1024,7 @@ bool GetInfoCache::LoadInfoFromServer() { // Map<int32, list<int32> properties case SqlInfoOptions::SQL_SUPPORTS_CONVERT: { arrow::MapScalar *map_scalar = - reinterpret_cast<arrow::MapScalar *>(scalar->value.get()); + reinterpret_cast<arrow::MapScalar *>(scalar->child_value().get()); auto data_array = map_scalar->value; arrow::StructArray *map_contents = reinterpret_cast<arrow::StructArray *>(data_array.get()); diff --git a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/json_converter.cc b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/json_converter.cc index fbe59f91dd3ea..fd66e988b8b63 100644 --- a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/json_converter.cc +++ b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/json_converter.cc @@ -265,7 +265,7 @@ class ScalarToJson : public arrow::ScalarVisitor { } Status Visit(const SparseUnionScalar &scalar) override { - return scalar.value->Accept(this); + return scalar.child_value()->Accept(this); } Status Visit(const DenseUnionScalar &scalar) override { diff --git a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/ui/dsn_configuration_window.cc b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/ui/dsn_configuration_window.cc index 37503a07e7574..6d9f2d7a13304 100644 --- a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/ui/dsn_configuration_window.cc +++ b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/ui/dsn_configuration_window.cc @@ -30,8 +30,8 @@ namespace { // This should have been checked before enabling the Test button. assert(missingProperties.empty()); - std::string serverName = boost::get<std::string>(flightSqlConn->GetInfo(SQL_SERVER_NAME)); - std::string serverVersion = boost::get<std::string>(flightSqlConn->GetInfo(SQL_DBMS_VER)); + std::string serverName = std::get<std::string>(flightSqlConn->GetInfo(SQL_SERVER_NAME)); + std::string serverVersion = std::get<std::string>(flightSqlConn->GetInfo(SQL_DBMS_VER)); return "Server Name: " + serverName + "\n" + "Server Version: " + serverVersion; } diff --git a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/utils.cc b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/utils.cc index 70dab8803fd7e..28f1715e63045 100644 --- a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/utils.cc +++ b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/utils.cc @@ -53,8 +53,8 @@ odbcabstraction::CDataType GetDefaultCCharType(bool useWideChar) { } using namespace odbcabstraction; -using arrow::util::make_optional; -using arrow::util::nullopt; +using std::make_optional; +using std::nullopt; /// \brief Returns the mapping from Arrow type to SqlDataType /// \param field the field to return the SqlDataType for @@ -274,7 +274,7 @@ GetRadixFromSqlDataType(odbcabstraction::SqlDataType data_type) { case SqlDataType_DOUBLE: return 2; default: - return arrow::util::nullopt; + return std::nullopt; } } @@ -338,7 +338,7 @@ optional<int16_t> GetSqlDateTimeSubCode(SqlDataType data_type) { case SqlDataType_INTERVAL_MINUTE_TO_SECOND: return SqlDateTimeSubCode_MINUTE_TO_SECOND; default: - return arrow::util::nullopt; + return std::nullopt; } } @@ -354,7 +354,7 @@ optional<int32_t> GetCharOctetLength(SqlDataType data_type, if (column_size.ok()) { return column_size.ValueOrDie(); } else { - return arrow::util::nullopt; + return std::nullopt; } case SqlDataType_WCHAR: case SqlDataType_WVARCHAR: @@ -362,7 +362,7 @@ optional<int32_t> GetCharOctetLength(SqlDataType data_type, if (column_size.ok()) { return column_size.ValueOrDie() * GetSqlWCharSize(); } else { - return arrow::util::nullopt; + return std::nullopt; } case SqlDataType_TINYINT: case SqlDataType_BIT: @@ -400,7 +400,7 @@ optional<int32_t> GetCharOctetLength(SqlDataType data_type, case SqlDataType_GUID: return 16; default: - return arrow::util::nullopt; + return std::nullopt; } } optional<int32_t> GetTypeScale(SqlDataType data_type, @@ -419,7 +419,7 @@ optional<int32_t> GetTypeScale(SqlDataType data_type, case SqlDataType_BIGINT: return 0; default: - return arrow::util::nullopt; + return std::nullopt; } } optional<int32_t> GetColumnSize(SqlDataType data_type, @@ -432,8 +432,8 @@ optional<int32_t> GetColumnSize(SqlDataType data_type, case SqlDataType_WCHAR: case SqlDataType_WVARCHAR: case SqlDataType_WLONGVARCHAR: - return column_size.has_value() ? arrow::util::make_optional(column_size.value() * GetSqlWCharSize()) - : arrow::util::nullopt; + return column_size.has_value() ? std::make_optional(column_size.value() * GetSqlWCharSize()) + : std::nullopt; case SqlDataType_BINARY: case SqlDataType_VARBINARY: case SqlDataType_LONGVARBINARY: @@ -479,7 +479,7 @@ optional<int32_t> GetColumnSize(SqlDataType data_type, case SqlDataType_GUID: return 16; default: - return arrow::util::nullopt; + return std::nullopt; } } @@ -493,8 +493,8 @@ optional<int32_t> GetBufferLength(SqlDataType data_type, case SqlDataType_WCHAR: case SqlDataType_WVARCHAR: case SqlDataType_WLONGVARCHAR: - return column_size.has_value() ? arrow::util::make_optional(column_size.value() * GetSqlWCharSize()) - : arrow::util::nullopt; + return column_size.has_value() ? std::make_optional(column_size.value() * GetSqlWCharSize()) + : std::nullopt; case SqlDataType_BINARY: case SqlDataType_VARBINARY: case SqlDataType_LONGVARBINARY: @@ -539,7 +539,7 @@ optional<int32_t> GetBufferLength(SqlDataType data_type, case SqlDataType_GUID: return 16; default: - return arrow::util::nullopt; + return std::nullopt; } } @@ -595,7 +595,7 @@ optional<int32_t> GetLength(SqlDataType data_type, const optional<int32_t>& colu case SqlDataType_GUID: return 16; default: - return arrow::util::nullopt; + return std::nullopt; } } diff --git a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/utils.h b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/utils.h index 374c3064ee946..390e08484f0e7 100644 --- a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/utils.h +++ b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/utils.h @@ -6,8 +6,9 @@ #pragma once +#include <optional> + #include <arrow/flight/types.h> -#include <arrow/util/optional.h> #include <boost/xpressive/xpressive.hpp> #include <codecvt> #include <odbcabstraction/exceptions.h> @@ -20,7 +21,7 @@ typedef std::function< std::shared_ptr<arrow::Array>(const std::shared_ptr<arrow::Array> &)> ArrayConvertTask; -using arrow::util::optional; +using std::optional; inline void ThrowIfNotOK(const arrow::Status &status) { if (!status.ok()) { @@ -30,7 +31,7 @@ inline void ThrowIfNotOK(const arrow::Status &status) { template <typename T, typename AttributeTypeT> inline bool CheckIfSetToOnlyValidValue(const AttributeTypeT &value, T allowed_value) { - return boost::get<T>(value) == allowed_value; + return std::get<T>(value) == allowed_value; } template <typename BUILDER, typename T> diff --git a/cpp/src/flightsql_odbc/flightsql-odbc/odbcabstraction/include/odbcabstraction/spi/connection.h b/cpp/src/flightsql_odbc/flightsql-odbc/odbcabstraction/include/odbcabstraction/spi/connection.h index 9fafc44d4bb41..ad68668afddfe 100644 --- a/cpp/src/flightsql_odbc/flightsql-odbc/odbcabstraction/include/odbcabstraction/spi/connection.h +++ b/cpp/src/flightsql_odbc/flightsql-odbc/odbcabstraction/include/odbcabstraction/spi/connection.h @@ -8,8 +8,8 @@ #include <boost/algorithm/string.hpp> #include <boost/optional.hpp> -#include <boost/variant.hpp> #include <map> +#include <variant> #include <vector> #include <odbcabstraction/types.h> @@ -19,8 +19,7 @@ namespace driver { namespace odbcabstraction { /// \brief Case insensitive comparator -struct CaseInsensitiveComparator - : std::binary_function<std::string, std::string, bool> { +struct CaseInsensitiveComparator { bool operator()(const std::string &s1, const std::string &s2) const { return boost::lexicographical_compare(s1, s2, boost::is_iless()); } @@ -49,8 +48,8 @@ class Connection { PACKET_SIZE, // uint32_t - The Packet Size }; - typedef boost::variant<std::string, void*, uint64_t, uint32_t> Attribute; - typedef boost::variant<std::string, uint32_t, uint16_t> Info; + typedef std::variant<std::string, void*, uint64_t, uint32_t> Attribute; + typedef std::variant<std::string, uint32_t, uint16_t> Info; typedef PropertyMap ConnPropertyMap; /// \brief Establish the connection. diff --git a/cpp/src/flightsql_odbc/flightsql-odbc/odbcabstraction/include/odbcabstraction/spi/statement.h b/cpp/src/flightsql_odbc/flightsql-odbc/odbcabstraction/include/odbcabstraction/spi/statement.h index 0d5776a824c71..0f7da998bf85e 100644 --- a/cpp/src/flightsql_odbc/flightsql-odbc/odbcabstraction/include/odbcabstraction/spi/statement.h +++ b/cpp/src/flightsql_odbc/flightsql-odbc/odbcabstraction/include/odbcabstraction/spi/statement.h @@ -7,8 +7,8 @@ #pragma once #include <boost/optional.hpp> -#include <boost/variant.hpp> #include <map> +#include <variant> #include <vector> namespace driver { @@ -37,7 +37,7 @@ class Statement { QUERY_TIMEOUT, // size_t - The time to wait in seconds for queries to execute. 0 to have no timeout. }; - typedef boost::variant<size_t> Attribute; + typedef std::variant<size_t> Attribute; /// \brief Set a statement attribute (may be called at any time) /// diff --git a/cpp/src/flightsql_odbc/flightsql-odbc/odbcabstraction/odbc_impl/ODBCConnection.cc b/cpp/src/flightsql_odbc/flightsql-odbc/odbcabstraction/odbc_impl/ODBCConnection.cc index 313b7b04f3c24..df4e8a6745ad4 100644 --- a/cpp/src/flightsql_odbc/flightsql-odbc/odbcabstraction/odbc_impl/ODBCConnection.cc +++ b/cpp/src/flightsql_odbc/flightsql-odbc/odbcabstraction/odbc_impl/ODBCConnection.cc @@ -274,7 +274,7 @@ void ODBCConnection::GetInfo(SQLUSMALLINT infoType, SQLPOINTER value, SQLSMALLIN case SQL_XOPEN_CLI_YEAR: { const auto& info = m_spiConnection->GetInfo(infoType); - const std::string& infoValue = boost::get<std::string>(info); + const std::string& infoValue = std::get<std::string>(info); GetStringAttribute(isUnicode, infoValue, true, value, bufferLength, outputLength, GetDiagnostics()); break; } @@ -365,7 +365,7 @@ void ODBCConnection::GetInfo(SQLUSMALLINT infoType, SQLPOINTER value, SQLSMALLIN case SQL_STANDARD_CLI_CONFORMANCE: { const auto& info = m_spiConnection->GetInfo(infoType); - uint32_t infoValue = boost::get<uint32_t>(info); + uint32_t infoValue = std::get<uint32_t>(info); GetAttribute(infoValue, value, bufferLength, outputLength); break; } @@ -401,7 +401,7 @@ void ODBCConnection::GetInfo(SQLUSMALLINT infoType, SQLPOINTER value, SQLSMALLIN case SQL_ODBC_SAG_CLI_CONFORMANCE: { const auto& info = m_spiConnection->GetInfo(infoType); - uint16_t infoValue = boost::get<uint16_t>(info); + uint16_t infoValue = std::get<uint16_t>(info); GetAttribute(infoValue, value, bufferLength, outputLength); break; } @@ -414,7 +414,7 @@ void ODBCConnection::GetInfo(SQLUSMALLINT infoType, SQLPOINTER value, SQLSMALLIN if (!attr) { throw DriverException("Optional feature not supported.", "HYC00"); } - const std::string &infoValue = boost::get<std::string>(*attr); + const std::string &infoValue = std::get<std::string>(*attr); GetStringAttribute(isUnicode, infoValue, true, value, bufferLength,outputLength, GetDiagnostics()); break; } @@ -599,7 +599,7 @@ void ODBCConnection::GetConnectAttr(SQLINTEGER attribute, SQLPOINTER value, if (!catalog) { throw DriverException("Optional feature not supported.", "HYC00"); } - const std::string &infoValue = boost::get<std::string>(*catalog); + const std::string &infoValue = std::get<std::string>(*catalog); GetStringAttribute(isUnicode, infoValue, true, value, bufferLength,outputLength, GetDiagnostics()); return; } @@ -628,7 +628,7 @@ void ODBCConnection::GetConnectAttr(SQLINTEGER attribute, SQLPOINTER value, throw DriverException("Invalid attribute", "HY092"); } - GetAttribute(static_cast<SQLUINTEGER>(boost::get<uint32_t>(*spiAttribute)), value, bufferLength, outputLength); + GetAttribute(static_cast<SQLUINTEGER>(std::get<uint32_t>(*spiAttribute)), value, bufferLength, outputLength); } void ODBCConnection::disconnect() { diff --git a/cpp/src/flightsql_odbc/flightsql-odbc/odbcabstraction/odbc_impl/ODBCStatement.cc b/cpp/src/flightsql_odbc/flightsql-odbc/odbcabstraction/odbc_impl/ODBCStatement.cc index 20524f7e7cdf9..b3e680fa7e1e6 100644 --- a/cpp/src/flightsql_odbc/flightsql-odbc/odbcabstraction/odbc_impl/ODBCStatement.cc +++ b/cpp/src/flightsql_odbc/flightsql-odbc/odbcabstraction/odbc_impl/ODBCStatement.cc @@ -20,7 +20,6 @@ #include <odbcabstraction/types.h> #include <boost/optional.hpp> #include <utility> -#include <boost/variant.hpp> using namespace ODBC; using namespace driver::odbcabstraction; @@ -451,7 +450,7 @@ void ODBCStatement::GetStmtAttr(SQLINTEGER statementAttribute, } if (spiAttribute) { - GetAttribute(static_cast<SQLULEN>(boost::get<size_t>(*spiAttribute)), + GetAttribute(static_cast<SQLULEN>(std::get<size_t>(spiAttribute.get())), output, bufferSize, strLenPtr); return; } diff --git a/cpp/src/flightsql_odbc/flightsql-odbc/vcpkg.json b/cpp/src/flightsql_odbc/flightsql-odbc/vcpkg.json index 8c065a15654a1..c5b4875b12848 100644 --- a/cpp/src/flightsql_odbc/flightsql-odbc/vcpkg.json +++ b/cpp/src/flightsql_odbc/flightsql-odbc/vcpkg.json @@ -1,6 +1,5 @@ { "name": "flightsql-odbc", - "version-string": "1.0.0", "dependencies": [ "abseil", "benchmark", @@ -19,13 +18,13 @@ "gflags", "openssl", "protobuf", - { "name": "zlib", "version>=": "1.3" }, "re2", "spdlog", "grpc", "utf8proc", + "xsimd", + "zlib", "zstd", "rapidjson" - ], - "builtin-baseline": "4e485c34f5e056327ef00c14e2e3620bc50de098" + ] }