178178from pyiceberg .utils .config import Config
179179from pyiceberg .utils .datetime import millis_to_datetime
180180from pyiceberg .utils .decimal import unscaled_to_decimal
181- from pyiceberg .utils .deprecated import deprecation_message
182181from pyiceberg .utils .properties import get_first_property_value , property_as_bool , property_as_int
183182from pyiceberg .utils .singleton import Singleton
184183from pyiceberg .utils .truncate import truncate_upper_bound_binary_string , truncate_upper_bound_text_string
@@ -1863,7 +1862,6 @@ class ArrowProjectionVisitor(SchemaWithPartnerVisitor[pa.Array, pa.Array | None]
18631862 _file_schema : Schema
18641863 _include_field_ids : bool
18651864 _downcast_ns_timestamp_to_us : bool
1866- _use_large_types : bool | None
18671865 _projected_missing_fields : dict [int , Any ]
18681866 _allow_timestamp_tz_mismatch : bool
18691867
@@ -1872,26 +1870,17 @@ def __init__(
18721870 file_schema : Schema ,
18731871 downcast_ns_timestamp_to_us : bool = False ,
18741872 include_field_ids : bool = False ,
1875- use_large_types : bool | None = None ,
18761873 projected_missing_fields : dict [int , Any ] = EMPTY_DICT ,
18771874 allow_timestamp_tz_mismatch : bool = False ,
18781875 ) -> None :
18791876 self ._file_schema = file_schema
18801877 self ._include_field_ids = include_field_ids
18811878 self ._downcast_ns_timestamp_to_us = downcast_ns_timestamp_to_us
1882- self ._use_large_types = use_large_types
18831879 self ._projected_missing_fields = projected_missing_fields
18841880 # When True, allows projecting timestamptz (UTC) to timestamp (no tz).
18851881 # Allowed for reading (aligns with Spark); disallowed for writing to enforce Iceberg spec's strict typing.
18861882 self ._allow_timestamp_tz_mismatch = allow_timestamp_tz_mismatch
18871883
1888- if use_large_types is not None :
1889- deprecation_message (
1890- deprecated_in = "0.10.0" ,
1891- removed_in = "0.11.0" ,
1892- help_message = "Argument `use_large_types` will be removed from ArrowProjectionVisitor" ,
1893- )
1894-
18951884 def _cast_if_needed (self , field : NestedField , values : pa .Array ) -> pa .Array :
18961885 file_field = self ._file_schema .find_field (field .field_id )
18971886
@@ -1940,8 +1929,6 @@ def _cast_if_needed(self, field: NestedField, values: pa.Array) -> pa.Array:
19401929 target_schema = schema_to_pyarrow (
19411930 promote (file_field .field_type , field .field_type ), include_field_ids = self ._include_field_ids
19421931 )
1943- if self ._use_large_types is False :
1944- target_schema = _pyarrow_schema_ensure_small_types (target_schema )
19451932 return values .cast (target_schema )
19461933
19471934 return values
0 commit comments