mikelui commented on code in PR #34730:
URL: https://github.com/apache/arrow/pull/34730#discussion_r1148481056
##########
python/pyarrow/src/arrow/python/arrow_to_pandas.cc:
##########
@@ -808,52 +808,20 @@ Status ConvertListsLike(PandasOptions options, const
ChunkedArray& data,
return Status::OK();
}
-Status ConvertMap(PandasOptions options, const ChunkedArray& data,
- PyObject** out_values) {
- // Get columns of underlying key/item arrays
- std::vector<std::shared_ptr<Array>> key_arrays;
- std::vector<std::shared_ptr<Array>> item_arrays;
- for (int c = 0; c < data.num_chunks(); ++c) {
- const auto& map_arr = checked_cast<const MapArray&>(*data.chunk(c));
- key_arrays.emplace_back(map_arr.keys());
- item_arrays.emplace_back(map_arr.items());
- }
-
- const auto& map_type = checked_cast<const MapType&>(*data.type());
- auto key_type = map_type.key_type();
- auto item_type = map_type.item_type();
+template<typename F1, typename F2, typename F3>
+Status ConvertMapHelper(
Review Comment:
this change makes sense when combined with the next commit
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]