Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions awswrangler/_data_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def pyarrow2athena( # noqa: PLR0911,PLR0912
return pyarrow2athena(dtype=dtype.value_type, ignore_null=ignore_null)
if pa.types.is_decimal(dtype):
return f"decimal({dtype.precision},{dtype.scale})"
if pa.types.is_list(dtype):
if pa.types.is_list(dtype) or pa.types.is_large_list(dtype):
return f"array<{pyarrow2athena(dtype=dtype.value_type, ignore_null=ignore_null)}>"
if pa.types.is_struct(dtype):
return (
Expand Down Expand Up @@ -100,7 +100,7 @@ def pyarrow2redshift( # noqa: PLR0911,PLR0912
return f"DECIMAL({dtype.precision},{dtype.scale})"
if pa.types.is_dictionary(dtype):
return pyarrow2redshift(dtype=dtype.value_type, string_type=string_type)
if pa.types.is_list(dtype) or pa.types.is_struct(dtype) or pa.types.is_map(dtype):
if pa.types.is_list(dtype) or pa.types.is_struct(dtype) or pa.types.is_map(dtype) or pa.types.is_large_list(dtype):
return "SUPER"
raise exceptions.UnsupportedType(f"Unsupported Redshift type: {dtype}")

Expand Down Expand Up @@ -213,7 +213,7 @@ def pyarrow2postgresql( # noqa: PLR0911
return pyarrow2postgresql(dtype=dtype.value_type, string_type=string_type)
if pa.types.is_binary(dtype):
return "BYTEA"
if pa.types.is_list(dtype):
if pa.types.is_list(dtype) or pa.types.is_large_list(dtype):
return pyarrow2postgresql(dtype=dtype.value_type, string_type=string_type) + "[]"
raise exceptions.UnsupportedType(f"Unsupported PostgreSQL type: {dtype}")

Expand Down