redpheonixx commented on code in PR #1799: URL: https://github.com/apache/iceberg-python/pull/1799#discussion_r2001293953
########## tests/io/test_pyarrow_stats.py: ########## @@ -72,7 +72,7 @@ StringType, ) from pyiceberg.utils.datetime import date_to_days, datetime_to_micros, time_to_micros - +from decimal import Decimal Review Comment: Hi @kevinjqliu , thanks for the comments We need Decimal as to create pa.array of decimal 128 type it accepts only integer and decimal values and not float values. Pls check comment on test_pyarrow_stats.py file changes ########## tests/io/test_pyarrow_stats.py: ########## @@ -470,6 +473,9 @@ def construct_test_table_primitive_types() -> Tuple[pq.FileMetaData, Union[Table strings = ["hello", "world"] uuids = [uuid.uuid3(uuid.NAMESPACE_DNS, "foo").bytes, uuid.uuid3(uuid.NAMESPACE_DNS, "bar").bytes] binaries = [b"hello", b"world"] + decimal8 = [Decimal("123.45"), Decimal("678.91")] + decimal16 = [Decimal("123456789.123456"), Decimal("678912345.678912")] + decimal32 = [Decimal("12345678901234.123456"), Decimal("98765432109870.654321")] Review Comment: decimal8 = pa.array([Decimal('123.45'), Decimal('678.91')], pa.decimal128(8, 2)) @kevinjqliu pls check if we can go with this as this have now proper precision and scale pls note here that this will accept only int and Decimal values and not float hence we require the above import Decimal Do let me know if I am incorrect here or there is any other workaround. -- 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 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