Skip to content

Commit 3515fc4

Browse files
committed
WIP
1 parent ecd7eac commit 3515fc4

2 files changed

Lines changed: 39 additions & 39 deletions

File tree

pyiceberg/manifest.py

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -879,31 +879,30 @@ def fetch_manifest_entry(self, io: FileIO, discard_deleted: bool = True) -> list
879879
# but this is the easiest for now until we
880880
# have the write part in there as well
881881
def _convert_entry(entry: Any) -> ManifestEntry:
882-
data_file = DataFile(
883-
DataFileContent(entry.data_file.content),
884-
entry.data_file.file_path,
885-
FileFormat(entry.data_file.file_format),
886-
Record(*(p.value() if p is not None else None for p in entry.data_file.partition)),
887-
entry.data_file.record_count,
888-
entry.data_file.file_size_in_bytes,
889-
entry.data_file.column_sizes,
890-
entry.data_file.value_counts,
891-
entry.data_file.null_value_counts,
892-
entry.data_file.nan_value_counts,
893-
entry.data_file.lower_bounds,
894-
entry.data_file.upper_bounds,
895-
entry.data_file.key_metadata,
896-
entry.data_file.split_offsets,
897-
entry.data_file.equality_ids,
898-
entry.data_file.sort_order_id,
899-
)
900-
882+
data_file = entry.data_file
901883
return ManifestEntry(
902884
ManifestEntryStatus(entry.status),
903885
entry.snapshot_id,
904886
entry.sequence_number,
905887
entry.file_sequence_number,
906-
data_file,
888+
DataFile(
889+
DataFileContent(data_file.content),
890+
data_file.file_path,
891+
FileFormat(data_file.file_format),
892+
Record(*(p.value() if p is not None else None for p in data_file.partition)),
893+
data_file.record_count,
894+
data_file.file_size_in_bytes,
895+
data_file.column_sizes,
896+
data_file.value_counts,
897+
data_file.null_value_counts,
898+
data_file.nan_value_counts,
899+
data_file.lower_bounds,
900+
data_file.upper_bounds,
901+
data_file.key_metadata,
902+
data_file.split_offsets,
903+
data_file.equality_ids,
904+
data_file.sort_order_id,
905+
),
907906
)
908907

909908
return [

tests/integration/test_partitioning_key.py

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -326,25 +326,26 @@
326326
(CAST('example' AS BINARY), 'Associated string value for binary `example`')
327327
""",
328328
),
329-
(
330-
[PartitionField(source_id=13, field_id=1001, transform=IdentityTransform(), name="decimal_field")],
331-
[Decimal("123.45")],
332-
Record(Decimal("123.45")),
333-
"decimal_field=123.45",
334-
f"""CREATE TABLE {identifier} (
335-
decimal_field decimal(5,2),
336-
string_field string
337-
)
338-
USING iceberg
339-
PARTITIONED BY (
340-
identity(decimal_field)
341-
)
342-
""",
343-
f"""INSERT INTO {identifier}
344-
VALUES
345-
(123.45, 'Associated string value for decimal 123.45')
346-
""",
347-
),
329+
# DISCUSSED IN https://github.com/apache/iceberg-rust/discussions/2062
330+
# (
331+
# [PartitionField(source_id=13, field_id=1001, transform=IdentityTransform(), name="decimal_field")],
332+
# [Decimal("123.45")],
333+
# Record(Decimal("123.45")),
334+
# "decimal_field=123.45",
335+
# f"""CREATE TABLE {identifier} (
336+
# decimal_field decimal(5,2),
337+
# string_field string
338+
# )
339+
# USING iceberg
340+
# PARTITIONED BY (
341+
# identity(decimal_field)
342+
# )
343+
# """,
344+
# f"""INSERT INTO {identifier}
345+
# VALUES
346+
# (123.45, 'Associated string value for decimal 123.45')
347+
# """,
348+
# ),
348349
# # Year Month Day Hour Transform
349350
# Month Transform
350351
(

0 commit comments

Comments
 (0)