I'm not sure about (1) but I'm pretty sure for (2) doing a cast of tz-aware timestamp to tz-naive should be a metadata-only change.
On Wed, Feb 15, 2023 at 4:19 PM Li Jin <ice.xell...@gmail.com> wrote: > Asking (2) because IIUC this is a metadata operation that could be zero > copy but I am not sure if this is actually the case. > > On Wed, Feb 15, 2023 at 10:17 AM Li Jin <ice.xell...@gmail.com> wrote: > > > Hello! > > > > I have some questions about type casting memory usage with pyarrow Table. > > Let's say I have a pyarrow Table with 100 columns. > > > > (1) if I want to cast n columns to a different type (e.g., float to int). > > What is the smallest memory overhead that I can do? (memory overhead of 1 > > column, n columns or 100 columns?) > > > > (2) if I want to cast n timestamp columns from tz-native to tz-UTC. What > > is the smallest memory overhead that I can do? (0, 1 column, n columns or > > 100 columns?) > > > > Thanks! > > Li > > >