From f564e9b7c39d417b68eb9258c25104149199e262 Mon Sep 17 00:00:00 2001 From: Jimmy Lu Date: Wed, 6 Jul 2022 07:23:33 -0700 Subject: [PATCH] Fix arrow schema conversion for complex types (#399) Summary: Pull Request resolved: https://github.com/pytorch/torcharrow/pull/399 X-link: https://github.com/facebookincubator/velox/pull/1857 1. Use `List` instead of `LargeList` because `vector_size_t` is 32 bits large. 2. Fix the conversion of `Map`; arrow requires an extra layer of struct type between the map type and key-value types. Reviewed By: pedroerp Differential Revision: D37356848 fbshipit-source-id: 237428cc315466a74a4285445dfc925a6cd2729d --- csrc/velox/column.h | 1 + csrc/velox/lib.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/csrc/velox/column.h b/csrc/velox/column.h index 6123e0d4b..d217d8b21 100644 --- a/csrc/velox/column.h +++ b/csrc/velox/column.h @@ -22,6 +22,7 @@ #include "velox/vector/BaseVector.h" #include "velox/vector/ComplexVector.h" #include "velox/vector/FlatVector.h" +#include "velox/vector/arrow/Abi.h" #include "velox/vector/arrow/Bridge.h" // TODO: Move uses of static variables into .cpp. Static variables are local to diff --git a/csrc/velox/lib.cpp b/csrc/velox/lib.cpp index e1002d6e6..b50af341b 100644 --- a/csrc/velox/lib.cpp +++ b/csrc/velox/lib.cpp @@ -25,6 +25,7 @@ #include "velox/functions/prestosql/registration/RegistrationFunctions.h" #include "velox/type/Type.h" #include "velox/vector/TypeAliases.h" +#include "velox/vector/arrow/Abi.h" #include "velox/vector/arrow/Bridge.h" #ifdef USE_TORCH