You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wes McKinney / @wesm:
Perhaps Concatenate can be reimplemented as a vector kernel, so that type promotions can be handled by the kernel execution machinery
Clark Zinzow:
+1 to having Concatenate go through the type promotion logic in the compute layer. I'm currently running into a similar issue with concatenating tables with different numeric types that can certainly be promoted to a common numeric type. I'm currently working around this in application code by doing manual type promotion of each column to the common dtype for that column across all tables (mimicking Arrow's internal type promotion logic here)) before concatenating the tables.
Here is a pyarrow MWE:
In [1]: t1=pa.table({"a": pa.array([1, 2], type=pa.int16())})
In [2]: t2=pa.table({"a": pa.array([3, 4], type=pa.int64())})
In [3]: pa.concat_tables([t1, t2])
---------------------------------------------------------------------------ArrowInvalidTraceback (mostrecentcalllast)
<ipython-input-91-40afec1155a5>in<module>---->1pa.concat_tables([t1, t2])
~/.local/lib/python3.7/site-packages/pyarrow/table.pxiinpyarrow.lib.concat_tables()
~/.local/lib/python3.7/site-packages/pyarrow/error.pxiinpyarrow.lib.pyarrow_internal_check_status()
~/.local/lib/python3.7/site-packages/pyarrow/error.pxiinpyarrow.lib.check_status()
ArrowInvalid: Schemaatindex1wasdifferent:
a: int16vsa: int64
inspired by GitHub issue #5874
Reporter: Wes McKinney / @wesm
Related issues:
Note: This issue was originally created as ARROW-7245. Please see the migration documentation for further details.
The text was updated successfully, but these errors were encountered: