@@ -2144,7 +2144,7 @@ def _dataframe_to_data_files(
21442144
21452145
21462146@dataclass (frozen = True )
2147- class TablePartition :
2147+ class _TablePartition :
21482148 partition_key : PartitionKey
21492149 arrow_table_partition : pa .Table
21502150
@@ -2154,7 +2154,7 @@ def _get_table_partitions(
21542154 partition_spec : PartitionSpec ,
21552155 schema : Schema ,
21562156 slice_instructions : list [dict [str , Any ]],
2157- ) -> list [TablePartition ]:
2157+ ) -> list [_TablePartition ]:
21582158 sorted_slice_instructions = sorted (slice_instructions , key = lambda x : x ["offset" ])
21592159
21602160 partition_fields = partition_spec .fields
@@ -2175,11 +2175,11 @@ def _get_table_partitions(
21752175 for partition_field in partition_fields
21762176 ]
21772177 partition_key = PartitionKey (raw_partition_field_values = fieldvalues , partition_spec = partition_spec , schema = schema )
2178- table_partitions .append (TablePartition (partition_key = partition_key , arrow_table_partition = partition_slice ))
2178+ table_partitions .append (_TablePartition (partition_key = partition_key , arrow_table_partition = partition_slice ))
21792179 return table_partitions
21802180
21812181
2182- def _determine_partitions (spec : PartitionSpec , schema : Schema , arrow_table : pa .Table ) -> List [TablePartition ]:
2182+ def _determine_partitions (spec : PartitionSpec , schema : Schema , arrow_table : pa .Table ) -> List [_TablePartition ]:
21832183 """Based on the iceberg table partition spec, slice the arrow table into partitions with their keys.
21842184
21852185 Example:
@@ -2235,6 +2235,6 @@ def _determine_partitions(spec: PartitionSpec, schema: Schema, arrow_table: pa.T
22352235 last = reversed_indices [ptr ]
22362236 ptr = ptr + group_size
22372237
2238- table_partitions : List [TablePartition ] = _get_table_partitions (arrow_table , spec , schema , slice_instructions )
2238+ table_partitions : List [_TablePartition ] = _get_table_partitions (arrow_table , spec , schema , slice_instructions )
22392239
22402240 return table_partitions
0 commit comments