From 776b3e3e938478fe8fd42e77996173f75010c27f Mon Sep 17 00:00:00 2001 From: Daniel Malky Date: Wed, 2 Apr 2025 17:00:16 +0300 Subject: [PATCH] Changing dtype lowercasing to start of athena2pyarrow function --- awswrangler/_data_types.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/awswrangler/_data_types.py b/awswrangler/_data_types.py index 67fe2d6ff..b90412a20 100644 --- a/awswrangler/_data_types.py +++ b/awswrangler/_data_types.py @@ -309,10 +309,10 @@ def _split_map(s: str) -> list[str]: def athena2pyarrow(dtype: str, df_type: str | None = None) -> pa.DataType: # noqa: PLR0911,PLR0912 """Athena to PyArrow data types conversion.""" - dtype = dtype.strip() + dtype = dtype.strip().lower() if dtype.startswith(("array", "struct", "map")): orig_dtype: str = dtype - dtype = dtype.lower().replace(" ", "") + dtype = dtype.replace(" ", "") if dtype == "tinyint": return pa.int8() if dtype == "smallint":