Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly support decimal types in mysql row -> arrow conversion #53

Merged

Conversation

Sevenannn
Copy link
Contributor

@Sevenannn Sevenannn commented Aug 20, 2024

Properly support decimal types in mysql row -> arrow conversion. Changes include:

  • Use column.decimals() to infer mysql decimal precision in rows_to_arrow
  • Map ColumnType::MYSQL_TYPE_DECIMAL | ColumnType::MYSQL_TYPE_NEWDECIMAL into concrete Arrow Decimal types instead of None in map_column_to_data_type
  • Use non-empty Array builder for mysql ColumnType::MYSQL_TYPE_DECIMAL | ColumnType::MYSQL_TYPE_NEWDECIMAL

Copy link
Collaborator

@phillipleblanc phillipleblanc left a comment

Choose a reason for hiding this comment

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

This could use a test, but otherwise LGTM.

@phillipleblanc phillipleblanc merged commit fb2ed04 into datafusion-contrib:main Aug 20, 2024
3 checks passed
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.

3 participants