Skip to content

Commit

Permalink
Fix typo in _primitive_to_phyisical (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
whisk authored Oct 27, 2023
1 parent 7ec1c04 commit 0a077fc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pyiceberg/io/pyarrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]):
Expand Down Expand Up @@ -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:
Expand All @@ -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}"
Expand Down

0 comments on commit 0a077fc

Please sign in to comment.