nealrichardson commented on a change in pull request #11183:
URL: https://github.com/apache/arrow/pull/11183#discussion_r712480182
##########
File path: r/R/query-engine.R
##########
@@ -20,11 +20,36 @@ do_exec_plan <- function(.data) {
final_node <- plan$Build(.data)
tab <- plan$Run(final_node)
+ # If arrange() created $temp_columns, make sure to omit them from the result
+ # We can't currently handle this in the ExecPlan itself because sorting
+ # happens in the end (SinkNode) so nothing comes after it.
if (length(final_node$sort$temp_columns) > 0) {
- # If arrange() created $temp_columns, make sure to omit them from the
result
tab <- tab[, setdiff(names(tab), final_node$sort$temp_columns), drop =
FALSE]
}
+ if (ncol(tab)) {
+ # Apply any column metadata from the original schema, where appropriate
+ original_schema <- source_data(.data)$schema
+ # TODO: do we care about other (non-R) metadata preservation?
Review comment:
We already do discard other metadata when you convert from Arrow to R.
Check out the example parquet file in inst/, for example: it has "pandas"
metadata. I suspect it would be more surprising/alarming if we started
messaging about this metadata all of the sudden.
--
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]