Open alexpeters1208 opened 4 months ago
I kind of prefer this the way it is. The client really only works with arrow. If we're going to add a pandas dependency for the client, it needs to be optional.
I kind of prefer this the way it is. The client really only works with arrow. If we're going to add a pandas dependency for the client, it needs to be optional.
It may be possible to check for a pandas-typed input without importing or depending on pandas. After that, only pyarrow is needed to make the conversion.
Currently, the Python client can be used to import data read from a Pandas dataframe. However,
Session.import_table()
only accepts Pyarrow tables, so the following workaround is required:It would be nice to be able to do this directly:
The R client accomplishes this by checking the type of the input table, converting it to an arrow table if possible, and calling a single method that converts an arrow RecordBatchReader to a DH table at the end:
And here's the methods that are being called:
Different clients may have different idiomatic solutions for this - the R OOP framework that was used does not support method overloading, so this workaround was the best way.