emecii commented on issue #51198: URL: https://github.com/apache/arrow/issues/51198#issuecomment-5571954703
Thanks — I agree that the lifetime strategy should be settled first. My proposed minimal direction mirrors the vroom approach: attach a `STRSXP` element cache to the existing ALTREP `data1` external pointer with `R_SetExternalPtrProtected`. `Elt()` would return an already-cached `CHARSXP`, or convert once and store it in that cache before returning it. `Materialize()` would reuse any cached elements while filling the final representation, then clear both the cache and the existing chunked-array reference. That keeps each `CHARSXP` reachable through the ALTREP object, avoids changing the public R API, and preserves the materialization path. I have a focused `gctorture()` regression based on the report's non-interned Latin-1 payload ready to validate this direction. The C++ source compiles locally, but my macOS R package build currently cannot load its `arrow.so` because its generated link flags omit RE2, so I have not opened a PR or treated the local change as validated. Does the protected `STRSXP` cache approach match the intended ownership model before I finish the runnable R test path? -- 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]
