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

Support FixedSizeBinary and FixedSizeList for the C data interface #1564

Merged
merged 1 commit into from
Apr 15, 2022

Conversation

sunchao
Copy link
Member

@sunchao sunchao commented Apr 13, 2022

Which issue does this PR close?

Closes #1553.

Rationale for this change

Currently the C data interface doesn't support FixedSizeBinary and FixedSizeList yet with the following error message:

CDataInterface("The datatype \"FixedSizeBinary(9)\" is still not supported in Rust implementation

What changes are included in this PR?

This PR adds support for FixedSizeBinary and FixedSizeList in the Rust C data interface.

Are there any user-facing changes?

Yes now FixedSizeBinary and FixedSizeList are supported. No API breakage.

@github-actions github-actions bot added the arrow Changes to the arrow crate label Apr 13, 2022
Copy link
Member

@viirya viirya left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks @sunchao

"""
Python -> Rust -> Python
"""
a = pa.array(["a", None, "bb", "ccc"], pa.binary())
Copy link
Member

Choose a reason for hiding this comment

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

is this also FixedSizeBinary?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is just binary since pa.binary() doesn't have length specified (different from pa.binary(3) for instance).

Copy link
Member

Choose a reason for hiding this comment

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

So just add for test coverage?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yea. I found there is no test coverage for binary type yet so just added it.

@sunchao
Copy link
Member Author

sunchao commented Apr 13, 2022

cc @alamb @jorgecarleitao too

@alamb
Copy link
Contributor

alamb commented Apr 15, 2022

Thanks @sunchao and @viirya

@alamb alamb merged commit 2bcc0cf into apache:master Apr 15, 2022
@sunchao sunchao deleted the fixed-len branch April 15, 2022 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support FixedSizeBinary in the Arrow C data interface
3 participants