Skip to content

Conversation

@mariosasko
Copy link
Collaborator

@mariosasko mariosasko commented Jul 4, 2022

Fix #4620

The issue stems from the fact that pa.array([time_data]).type returns DataType(time64[unit]), which doesn't expose the unit attribute, instead of Time64Type(time64[unit]). I believe this is a bug in PyArrow. Luckily, the both types have the same str(), so in this PR I call pa.type_for_alias(str(type)) to convert them both to the Time64Type(time64[unit]) format.

cc @severo

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jul 4, 2022

The documentation is not available anymore as the PR was closed or merged.

Copy link
Member

@lhoestq lhoestq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks !

@mariosasko mariosasko merged commit e662d75 into main Jul 7, 2022
@mariosasko mariosasko deleted the fix-4620 branch July 7, 2022 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Data type is not recognized when using datetime.time

4 participants