You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/06/23 14:46:24 UTC

[GitHub] [arrow] romainfrancois commented on a change in pull request #7514: ARROW-6235: [R] Implement conversion from arrow::BinaryArray to R character vector

romainfrancois commented on a change in pull request #7514:
URL: https://github.com/apache/arrow/pull/7514#discussion_r444281970



##########
File path: r/src/array_from_vector.cpp
##########
@@ -1067,12 +1110,22 @@ std::shared_ptr<arrow::DataType> InferArrowTypeFromVector<VECSXP>(SEXP x) {
   if (Rf_inherits(x, "data.frame")) {
     return InferArrowTypeFromDataFrame(x);
   } else {
-    if (XLENGTH(x) == 0) {
-      Rcpp::stop(
-          "Requires at least one element to infer the values' type of a list vector");
-    }
+    SEXP ptype = Rf_getAttrib(x, symbols::ptype);
+    if (ptype == R_NilValue) {

Review comment:
       IIRC @lionel- ? said he prefers `== R_NilValue` 




----------------------------------------------------------------
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:
users@infra.apache.org