romainfrancois commented on pull request #10730: URL: https://github.com/apache/arrow/pull/10730#issuecomment-901905934
I finally settled for a single altrep (template) class for both cases (the array has no nulls or the array has nulls). The altrep object uses: - data1: an external pointer to the Array (well to a shared pointer to the Array) - data2: NULL until materialization is needed, then data2 is a standard (and immutable) R vector with the same data Materialization is needed when: - we need the DATAPTR and the Array has nulls - we need a duplicate Get_region() does not need to materialize the full vector. Creating the altrep object does not alter the data to impose the R sentinel. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org