Skip to content

Commit f959628

Browse files
pal0064jaidisido
andauthored
fix: map datatype issue of athena (#1753)
Athena does not allow space between map types. e.g. map<STRING, STRING> will give error while querying but map<STRING,STRING> won't Co-authored-by: jaidisido <[email protected]>
1 parent 03fdd9b commit f959628

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

awswrangler/_data_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def pyarrow2athena( # pylint: disable=too-many-branches,too-many-return-stateme
5454
if pa.types.is_struct(dtype):
5555
return f"struct<{','.join([f'{f.name}:{pyarrow2athena(dtype=f.type)}' for f in dtype])}>"
5656
if pa.types.is_map(dtype):
57-
return f"map<{pyarrow2athena(dtype=dtype.key_type)}, {pyarrow2athena(dtype=dtype.item_type)}>"
57+
return f"map<{pyarrow2athena(dtype=dtype.key_type)},{pyarrow2athena(dtype=dtype.item_type)}>"
5858
if dtype == pa.null():
5959
if ignore_null:
6060
return ""

0 commit comments

Comments
 (0)