|
28 | 28 |
|
29 | 29 | from pyiceberg.partitioning import PartitionField, PartitionSpec |
30 | 30 | from pyiceberg.schema import Schema |
31 | | -from pyiceberg.transforms import IdentityTransform |
| 31 | +from pyiceberg.transforms import IdentityTransform, DayTransform |
32 | 32 | from pyiceberg.types import ( |
33 | 33 | IntegerType, |
34 | 34 | NestedField, |
| 35 | + TimestampType, |
35 | 36 | ) |
36 | 37 |
|
37 | 38 |
|
@@ -572,23 +573,23 @@ def avro_schema_manifest_entry() -> Dict[str, Any]: |
572 | 573 | def test_schema() -> Schema: |
573 | 574 | return Schema( |
574 | 575 | NestedField(1, "VendorID", IntegerType(), False), |
575 | | - NestedField(2, "tpep_pickup_datetime", IntegerType(), False), |
| 576 | + NestedField(2, "tpep_pickup_datetime", TimestampType(), False), |
576 | 577 | ) |
577 | 578 |
|
578 | 579 |
|
579 | 580 | @pytest.fixture(scope="session") |
580 | 581 | def test_partition_spec() -> Schema: |
581 | 582 | return PartitionSpec( |
582 | 583 | PartitionField(1, 1000, IdentityTransform(), "VendorID"), |
583 | | - PartitionField(2, 1001, IdentityTransform(), "tpep_pickup_datetime"), |
| 584 | + PartitionField(2, 1001, DayTransform(), "tpep_pickup_datetime"), |
584 | 585 | ) |
585 | 586 |
|
586 | 587 |
|
587 | 588 | @pytest.fixture(scope="session") |
588 | 589 | def generated_manifest_entry_file( |
589 | | - avro_schema_manifest_entry: Dict[str, Any], |
590 | | - test_schema: Schema, |
591 | | - test_partition_spec: PartitionSpec, |
| 590 | + avro_schema_manifest_entry: Dict[str, Any], |
| 591 | + test_schema: Schema, |
| 592 | + test_partition_spec: PartitionSpec, |
592 | 593 | ) -> Generator[str, None, None]: |
593 | 594 | from fastavro import parse_schema, writer |
594 | 595 |
|
|
0 commit comments