jonkeane commented on a change in pull request #10601:
URL: https://github.com/apache/arrow/pull/10601#discussion_r658849273
##########
File path: r/src/array_to_vector.cpp
##########
@@ -723,9 +723,13 @@ class Converter_Struct : public Converter {
auto colnames = arrow::r::to_r_strings(
type->fields(),
[](const std::shared_ptr<Field>& field) { return field->name(); });
- out.attr(symbols::row_names) = arrow::r::short_row_names(n);
out.attr(R_NamesSymbol) = colnames;
- out.attr(R_ClassSymbol) = arrow::r::data::classes_tbl_df;
+
+ // backwards compatibility
+ if (arrow::r::GetBoolOption("arrow.structs_as_dfs", false)) {
+ out.attr(symbols::row_names) = arrow::r::short_row_names(n);
+ out.attr(R_ClassSymbol) = arrow::r::data::classes_tbl_df;
+ }
Review comment:
This is the other option for backwards compatibility which (if set) will
restore the re-classing all structs as data.frames. It is more robust than the
metadata one above, so is probably better.
--
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]