From 7a50f915b44d78770950c81fabb2fdf7e97ca57b Mon Sep 17 00:00:00 2001 From: Davis Vaughan Date: Mon, 6 Nov 2023 08:54:55 -0500 Subject: [PATCH] Add note about ALTREP wrapper minimum size --- src/reconstruct.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/reconstruct.cpp b/src/reconstruct.cpp index e3e56bbbdf..f9862c6395 100644 --- a/src/reconstruct.cpp +++ b/src/reconstruct.cpp @@ -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