You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Confirmed. _get_column_type only takes the map and row/struct branches when _nested is set; #755 / PR #774 deliberately limited typed reflection to ARRAY columns, so top-level map<...> still reflects as String. The same applies to top-level struct<...> / row(...) columns, which this issue does not mention. Please widen the scope to cover both so reflection is consistent, returning AthenaMap(...) and AthenaStruct(...) respectively.
This changes the reflected type of existing columns from String, so it will be release-noted as a behavior change.
Per CONTRIBUTING.md, please validate against a real table (Glue metadata and the information_schema fallback both feed this code) in your own AWS environment and record before/after results in the PR's TEST section. External-fork PRs are not run in the project's AWS CI.
If you plan to send a PR for this, please say so here. If the issue stays open for a long time without a PR, the maintainers may pick it up and implement the fix themselves.
Fixed on master by #995 (6be7de3): top-level map<...> columns now reflect as AthenaMap(key_type, value_type), and top-level struct<...> / row(...) columns as AthenaStruct(...), as nested ones already did. For example, AthenaDialect()._get_column_type("map<string,int>") returns AthenaMap(key_type=String(), value_type=INTEGER()). The change will be release-noted as a behavior change, since these columns previously reflected as String. Thank you for the report.
The fix is released in v3.38.0, backported to the 3.x line in #1104.
Reflected top-level map<...> columns are AthenaMap(key_type, value_type), and top-level struct<...> / row(...) columns are AthenaStruct with their field types, instead of String.
On 3.x, an unrecognized field, key, or value type is reflected as NullType with a warning and still renders as NULL in CREATE TABLE. In 4.0.0, NullType raises CompileError in DDL instead (#995, #961). Thank you again for the report.
Activity
laughingman7743 commentedon Sep 26, 2026
Confirmed.
_get_column_typeonly takes themapandrow/structbranches when_nestedis set; #755 / PR #774 deliberately limited typed reflection to ARRAY columns, so top-levelmap<...>still reflects asString. The same applies to top-levelstruct<...>/row(...)columns, which this issue does not mention. Please widen the scope to cover both so reflection is consistent, returningAthenaMap(...)andAthenaStruct(...)respectively.This changes the reflected type of existing columns from
String, so it will be release-noted as a behavior change.Per CONTRIBUTING.md, please validate against a real table (Glue metadata and the
information_schemafallback both feed this code) in your own AWS environment and record before/after results in the PR's TEST section. External-fork PRs are not run in the project's AWS CI.laughingman7743 commentedon Sep 26, 2026
Target
masterfor the fix; the maintainers will port it to the3.xmaintenance branch afterwards, so please do not open a PR against3.x.laughingman7743 commentedon Sep 26, 2026
If you plan to send a PR for this, please say so here. If the issue stays open for a long time without a PR, the maintainers may pick it up and implement the fix themselves.
laughingman7743 commentedon Oct 3, 2026
Fixed on
masterby #995 (6be7de3): top-levelmap<...>columns now reflect asAthenaMap(key_type, value_type), and top-levelstruct<...>/row(...)columns asAthenaStruct(...), as nested ones already did. For example,AthenaDialect()._get_column_type("map<string,int>")returnsAthenaMap(key_type=String(), value_type=INTEGER()). The change will be release-noted as a behavior change, since these columns previously reflected asString. Thank you for the report.Backport #995: Reflect the field and value types of top-level STRUCT …
laughingman7743 commentedon Oct 6, 2026
The fix is released in v3.38.0, backported to the 3.x line in #1104.
Reflected top-level
map<...>columns areAthenaMap(key_type, value_type), and top-levelstruct<...>/row(...)columns areAthenaStructwith their field types, instead ofString.On 3.x, an unrecognized field, key, or value type is reflected as
NullTypewith a warning and still renders asNULLinCREATE TABLE. In 4.0.0,NullTyperaisesCompileErrorin DDL instead (#995, #961). Thank you again for the report.