wesm commented on a change in pull request #7435: URL: https://github.com/apache/arrow/pull/7435#discussion_r441170772
########## File path: r/src/array_from_vector.cpp ########## @@ -201,6 +202,67 @@ struct VectorToArrayConverter { return Status::OK(); } + template <typename T> + arrow::enable_if_t<is_struct_type<T>::value, Status> Visit(const T& type) { + using BuilderType = typename TypeTraits<T>::BuilderType; + ARROW_RETURN_IF(!Rf_inherits(x, "data.frame"), + Status::RError("Expecting a data frame")); + + auto* struct_builder = checked_cast<BuilderType*>(builder); + + int64_t n = vctrs::short_vec_size(x); Review comment: It seems in R it's possible to have data-frame-like tibble columns that are malformed viewed as Arrow-like (as evidenced by the unit test) ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org