Skip to content

Cannot send uppercase array/struct/map dtype to 'athena2pyarrow' function #3121

@DanielMy777

Description

@DanielMy777

Describe the bug

In the awswrangler\_data_types.py file, The athena2pyarrow function is present.
Generally, this function takes a dtype parameter (of Athena type) and converts it to pyarrow types.

When sending an uppercase complex (array/struct/map) dtype to this function - an error will occur:

UnboundLocalError: local variable 'orig_dtype' referenced before assignment

How to Reproduce

Try to trigger the athena2pyarrow function with the dtype parameter set as:
STRUCT<store_id: STRING, terminal_id: STRING>

Expected behavior

I'd expect the function to work correctly even with the uppercased parameters, as all other functions in this file support uppercase notations.

Your project

No response

Screenshots

Image

OS

Win

Python version

3.9

AWS SDK for pandas version

3.9.1

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions