| 129 | } |
| 130 | |
| 131 | static inline std::shared_ptr<arrow::DataType> InferArrowTypeFromDataFrame( |
| 132 | cpp11::list x) { |
| 133 | R_xlen_t n = x.size(); |
| 134 | cpp11::strings names(x.attr(R_NamesSymbol)); |
| 135 | std::vector<std::shared_ptr<arrow::Field>> fields(n); |
| 136 | for (R_xlen_t i = 0; i < n; i++) { |
| 137 | fields[i] = arrow::field(names[i], InferArrowType(x[i])); |
| 138 | } |
| 139 | return arrow::struct_(std::move(fields)); |
| 140 | } |
| 141 | |
| 142 | template <> |
| 143 | std::shared_ptr<arrow::DataType> InferArrowTypeFromVector<VECSXP>(SEXP x) { |
no test coverage detected