File tree Expand file tree Collapse file tree 1 file changed +2
-14
lines changed
cpp/src/arrow/flight/sql/odbc/odbc_impl Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change 2626#include " arrow/compute/api.h"
2727#include " arrow/type.h"
2828#include " arrow/type_fwd.h"
29+ #include " arrow/type_traits.h"
2930
3031#include " arrow/flight/sql/odbc/odbc_impl/json_converter.h"
3132
3738namespace arrow ::flight::sql::odbc {
3839namespace util {
3940namespace {
40- bool IsComplexType (Type::type type_id) {
41- switch (type_id) {
42- case Type::LIST:
43- case Type::LARGE_LIST:
44- case Type::FIXED_SIZE_LIST:
45- case Type::MAP:
46- case Type::STRUCT:
47- return true ;
48- default :
49- return false ;
50- }
51- }
52-
5341SqlDataType GetDefaultSqlCharType (bool use_wide_char) {
5442 return use_wide_char ? SqlDataType_WCHAR : SqlDataType_CHAR;
5543}
@@ -998,7 +986,7 @@ ArrayConvertTask GetConverter(Type::type original_type_id, CDataType target_type
998986
999987 return finish.ValueOrDie ();
1000988 };
1001- } else if (IsComplexType (original_type_id) &&
989+ } else if (is_nested (original_type_id) &&
1002990 (target_type == CDataType_CHAR || target_type == CDataType_WCHAR)) {
1003991 return [=](const std::shared_ptr<Array>& original_array) {
1004992 const auto & json_conversion_result = ConvertToJson (original_array);
You can’t perform that action at this time.
0 commit comments