arrow-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Дима Фомин <>
Subject Re: ArrowNotImplementedError: No cast implemented from decimal(2,2) to decimal(12,2)
Date Thu, 24 Oct 2019 14:53:10 GMT
<div>Digging this I just found that this code breaks my Python Kernel :(</div><div> </div><div>import
sqlalchemy as sq</div><div>import pyarrow as pa</div><div> </div><div>aaa,
bbb = sq.sql.sqltypes.decimal.Decimal(123.234), sq.sql.sqltypes.decimal.Decimal(123.234)</div><div>ddd
= [aaa, bbb]</div><div>pa.array(ddd)</div><div> </div><div>So
seems pyarrow.array is limited with types of array elements, doesnt'it?</div><div> </div><div>WBR,</div><div>Dima
Fomin</div><div> </div><div>24.10.2019, 15:47, "Dima Fomin" &lt;;:</div><blockquote><div>Hello!</div><div>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.</div><div> </div><div>I faced
such issues - get Subj Error</div><blockquote><div>ArrowNotImplementedError:
No cast implemented from decimal(2,2) to decimal(12,2)</div></blockquote><div>when
trying to <em>pyarrow.Table.from_batches</em> array of values defined in schema
as <em>pyarrow.decimal128(12,2)</em>.</div><div> </div><div>Which
values are in fact column of <em>sqlAlchemy.sql.sqltypes.DECIMAL()="DECIMAL(precision=12,scale=2)"</em>
values, which I map in schema like this <em>pyarrow.decimal128(12,2)</em>.</div><div> </div><div>What
could be a reason of issue?</div><div>Could it be that somehow declared decimal
type of data is reduced to minimum value which met in data? :/</div><div> </div><div>With
best regards,</div><div>Dima Fomin</div></blockquote>
View raw message