innobi / pantab

Read/Write pandas DataFrames with Tableau Hyper Extracts
BSD 3-Clause "New" or "Revised" License
114 stars 44 forks source link

ValueError: Unsupported Arrow type: uint16 #376

Open skyth540 opened 1 month ago

skyth540 commented 1 month ago

uint16 is not supported in writing with frame_to_hyper

WillAyd commented 1 month ago

The Hyper database (and to be fair, most major databases) do not offer an unsigned integral storage type.

I think what the PostgreSQL ADBC driver does is map:

While not supporting uint64. This ensures that there is no value loss when writing the data, although you end up using double the storage and cannot roundtrip the type.

So...ultimately you are better off casting your data to the proper signed type before you write it. However, I'd definitely accept a PR to mirror what the ADBC postgresql driver does as a convenience to users