|
16 | 16 | # under the License. |
17 | 17 | # pylint:disable=redefined-outer-name |
18 | 18 | from datetime import date, datetime, timedelta, timezone |
19 | | -from decimal import Decimal |
20 | 19 | from typing import Any |
21 | 20 |
|
22 | 21 | import pytest |
|
618 | 617 | ('abcdefg', 'Another sample for string'); |
619 | 618 | """, |
620 | 619 | ), |
621 | | - ( |
622 | | - [PartitionField(source_id=13, field_id=1001, transform=TruncateTransform(width=5), name="decimal_field_trunc")], |
623 | | - [Decimal("678.93")], |
624 | | - Record(Decimal("678.90")), |
625 | | - "decimal_field_trunc=678.90", # Assuming truncation width of 1 leads to truncating to 670 |
626 | | - f"""CREATE TABLE {identifier} ( |
627 | | - decimal_field decimal(5,2), |
628 | | - string_field string |
629 | | - ) |
630 | | - USING iceberg |
631 | | - PARTITIONED BY ( |
632 | | - truncate(decimal_field, 2) |
633 | | - ) |
634 | | - """, |
635 | | - f"""INSERT INTO {identifier} |
636 | | - VALUES |
637 | | - (678.90, 'Associated string value for decimal 678.90') |
638 | | - """, |
639 | | - ), |
| 620 | + # ( |
| 621 | + # [PartitionField(source_id=13, field_id=1001, transform=TruncateTransform(width=5), name="decimal_field_trunc")], |
| 622 | + # [Decimal("678.93")], |
| 623 | + # Record(Decimal("678.90")), |
| 624 | + # "decimal_field_trunc=678.90", # Assuming truncation width of 1 leads to truncating to 670 |
| 625 | + # f"""CREATE TABLE {identifier} ( |
| 626 | + # decimal_field decimal(5,2), |
| 627 | + # string_field string |
| 628 | + # ) |
| 629 | + # USING iceberg |
| 630 | + # PARTITIONED BY ( |
| 631 | + # truncate(decimal_field, 2) |
| 632 | + # ) |
| 633 | + # """, |
| 634 | + # f"""INSERT INTO {identifier} |
| 635 | + # VALUES |
| 636 | + # (678.90, 'Associated string value for decimal 678.90') |
| 637 | + # """, |
| 638 | + # ), |
640 | 639 | ( |
641 | 640 | [PartitionField(source_id=11, field_id=1001, transform=TruncateTransform(10), name="binary_field_trunc")], |
642 | 641 | [b"HELLOICEBERG"], |
|
0 commit comments