Problem
AthenaDialect._get_column_type now reflects array<...> and nested map/struct types, but a top-level map<string,int> column still reflects as String, so the key and value types are lost for inspectors and autoload_with tables.
Reproduction
from pyathena.sqlalchemy.base import AthenaDialect
AthenaDialect()._get_column_type('map<string,int>') # String()
AthenaDialect()._get_column_type('array<map<string,int>>').item_type # AthenaMap(...)
Environment
PyAthena 3.35.4 and master (c01c56f), Python 3.11, SQLAlchemy 2.0.52, Athena engine version 3.
Proposed fix (optional)
Apply the nested map branch at the top level too, returning AthenaMap(key_type, value_type).
Problem
AthenaDialect._get_column_typenow reflectsarray<...>and nestedmap/structtypes, but a top-levelmap<string,int>column still reflects asString, so the key and value types are lost for inspectors andautoload_withtables.Reproduction
Environment
PyAthena 3.35.4 and master (c01c56f), Python 3.11, SQLAlchemy 2.0.52, Athena engine version 3.
Proposed fix (optional)
Apply the nested
mapbranch at the top level too, returningAthenaMap(key_type, value_type).