I am trying to check if creating an arrow Array from an r object creates a copy or not. I create an array and then create an atomic vector back from that array but the memory adress doesn't seem to be the same... Is there something I am doing wrong?
> library(arrow)
> v = c(1L,2L,3L)
> a = arrow::Array$create(v)
>
> .Internal(inspect(v))
@0x00000248ddac1f38 13 INTSXP g0c2 [REF(5)] (len=3, tl=0) 1,2,3
> .Internal(inspect(v[1]))
@0x00000248d5bc3dd0 13 INTSXP g0c1 [] (len=1, tl=0) 1
>
> d = a$as_vector()
> .Internal(inspect(d))
@0x00000248da541230 13 INTSXP g0c0 [REF(65535)] arrow::ChunkedArray<0x00000248dac3e2b0, int32, 1 chunks, 0 nulls> len=3
> .Internal(inspect(d[1]))
@0x00000248d5bc3fc8 13 INTSXP g0c1 [] (len=1, tl=0) 1