Skip to content

Commit

Permalink
Add note about ALTREP wrapper minimum size
Browse files Browse the repository at this point in the history
  • Loading branch information
DavisVaughan committed Nov 6, 2023
1 parent ebc8bfe commit 7a50f91
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/reconstruct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ SEXP ffi_dplyr_reconstruct(SEXP data, SEXP template_) {
Rf_errorcall(R_NilValue, "Internal error: `template` must have a `row.names` attribute.");
}

// Make an ALTREP wrapper if possible, since the underlying data doesn't change
// Make an ALTREP wrapper if possible, since the underlying data doesn't change.
// Won't actually make an ALTREP wrapper unless there are >64 columns
// (internally controlled by R).
#if R_VERSION >= R_Version(3, 6, 0)
data = PROTECT(R_shallow_duplicate_attr(data));
#else
Expand Down

0 comments on commit 7a50f91

Please sign in to comment.