From 0a077fcc0dceb95ca4316505bba1f41c60f8f74f Mon Sep 17 00:00:00 2001 From: Alex Svetkin Date: Fri, 27 Oct 2023 21:29:10 +0200 Subject: [PATCH] Fix typo in `_primitive_to_phyisical` (#108) --- pyiceberg/io/pyarrow.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyiceberg/io/pyarrow.py b/pyiceberg/io/pyarrow.py index f3ef5ca5a0..59bad8113b 100644 --- a/pyiceberg/io/pyarrow.py +++ b/pyiceberg/io/pyarrow.py @@ -1100,8 +1100,8 @@ def map_value_partner(self, partner_map: Optional[pa.Array]) -> Optional[pa.Arra return partner_map.items if isinstance(partner_map, pa.MapArray) else None -def _primitive_to_phyisical(iceberg_type: PrimitiveType) -> str: - return visit(iceberg_type, _PRIMITIVE_TO_PHYISCAL_TYPE_VISITOR) +def _primitive_to_physical(iceberg_type: PrimitiveType) -> str: + return visit(iceberg_type, _PRIMITIVE_TO_PHYSICAL_TYPE_VISITOR) class PrimitiveToPhysicalType(SchemaVisitorPerPrimitiveType[str]): @@ -1163,7 +1163,7 @@ def visit_binary(self, binary_type: BinaryType) -> str: return "BYTE_ARRAY" -_PRIMITIVE_TO_PHYISCAL_TYPE_VISITOR = PrimitiveToPhysicalType() +_PRIMITIVE_TO_PHYSICAL_TYPE_VISITOR = PrimitiveToPhysicalType() class StatsAggregator: @@ -1176,7 +1176,7 @@ def __init__(self, iceberg_type: PrimitiveType, physical_type_string: str, trunc self.current_max = None self.trunc_length = trunc_length - expected_physical_type = _primitive_to_phyisical(iceberg_type) + expected_physical_type = _primitive_to_physical(iceberg_type) if expected_physical_type != physical_type_string: raise ValueError( f"Unexpected physical type {physical_type_string} for {iceberg_type}, expected {expected_physical_type}"