vtk9 opened a new issue, #669:
URL: https://github.com/apache/iceberg-python/issues/669

   ### Apache Iceberg version
   
   0.6.0 (latest release)
   
   ### Please describe the bug 🐞
   
   Hello,
   
   Is this a bug or is there something obvious I am misunderstanding/misusing. 
(I am relatively new to iceberg). Tested on MacOS M2 arm64
   
   ```python
   from decimal import Decimal
   from pyiceberg.catalog.sql import SqlCatalog
   import pyarrow as pa
   
   pylist = [{'decimal_col': Decimal('32768.')}]
   arrow_schema = pa.schema(
       [
           pa.field('decimal_col', pa.decimal128(38, 0)),
       ],
   )
   arrow_table = pa.Table.from_pylist(pylist, schema=arrow_schema)
   
   catalog = SqlCatalog(
       'test_catalog',
       **{
           'type': "sql'",
           'uri': 'sqlite:///pyiceberg.db',
       },
   )
   
   namespace = 'test_ns'
   table_name = 'test_table'
   
   catalog.create_namespace(namespace=namespace)
   new_table = catalog.create_table(
       identifier=f'{namespace}.{table_name}',
       schema=arrow_schema,
       location='.',
   )
   
   new_table.append(arrow_table)
   ```
   ```
   OverflowError: int too big to convert
   ```
   
   - Note: `pylist = [{'decimal_col': Decimal('32767.')}]` works
   - Switching `pa.field('decimal_col', pa.decimal128(38, 1)),` also works
   
   Thank you!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to