File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -702,17 +702,12 @@ def pyarrow_schema_from_pandas(
702702
703703def athena_types_from_pyarrow_schema (
704704 schema : pa .Schema ,
705- partitions : pyarrow .parquet .ParquetPartitions | None ,
706705 ignore_null : bool = False ,
707- ) -> tuple [ dict [str , str ], dict [ str , str ] | None ]:
706+ ) -> dict [str , str ]:
708707 """Extract the related Athena data types from any PyArrow Schema considering possible partitions."""
709708 columns_types : dict [str , str ] = {str (f .name ): pyarrow2athena (dtype = f .type , ignore_null = ignore_null ) for f in schema }
710709 _logger .debug ("columns_types: %s" , columns_types )
711- partitions_types : dict [str , str ] | None = None
712- if partitions is not None :
713- partitions_types = {p .name : pyarrow2athena (p .dictionary .type , ignore_null = ignore_null ) for p in partitions }
714- _logger .debug ("partitions_types: %s" , partitions_types )
715- return columns_types , partitions_types
710+ return columns_types
716711
717712
718713def cast_pandas_with_athena_types (
Original file line number Diff line number Diff line change @@ -280,8 +280,8 @@ def read_table_metadata(
280280 merged_schemas = _validate_schemas (schemas = schemas , validate_schema = False )
281281
282282 columns_types : dict [str , str ] = _data_types .athena_types_from_pyarrow_schema (
283- schema = merged_schemas , partitions = None , ignore_null = ignore_null
284- )[ 0 ]
283+ schema = merged_schemas , ignore_null = ignore_null
284+ )
285285
286286 # Partitions
287287 partitions_types : dict [str , str ] | None = None
You can’t perform that action at this time.
0 commit comments