Digging this I just found that this code breaks my Python Kernel :(
import sqlalchemy as sq
import pyarrow as pa
aaa, bbb = sq.sql.sqltypes.decimal.Decimal(123.234), sq.sql.sqltypes.decimal.Decimal(123.234)
ddd = [aaa, bbb]
pa.array(ddd)
So seems pyarrow.array is limited with types of array elements, doesnt'it?
WBR,
Dima Fomin
24.10.2019, 15:47, "Dima Fomin" <[email protected]>:
Hello!First of all thank you very much for your efforts on Apache Arrow! This looks very useful and prominent tech to be able use it in self-BI area.I faced such issues - get Subj ErrorArrowNotImplementedError: No cast implemented from decimal(2,2) to decimal(12,2)when trying to pyarrow.Table.from_batches array of values defined in schema as pyarrow.decimal128(12,2).Which values are in fact column of sqlAlchemy.sql.sqltypes.DECIMAL()="DECIMAL(precision=12,scale=2)" values, which I map in schema like this pyarrow.decimal128(12,2).What could be a reason of issue?Could it be that somehow declared decimal type of data is reduced to minimum value which met in data? :/With best regards,Dima Fomin
