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

refactor(rust): rename the DataType in the polars-arrow crate to ArrowDataType for clarity, preventing conflation with our own/native DataType #12459

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

alexander-beedie
Copy link
Collaborator

@alexander-beedie alexander-beedie commented Nov 14, 2023

"That escalated quickly..." 😅

Having two different flavours of DataType wasn't ideal; now that we've brought the code inside (via polars-arrow) it makes sense to better distinguish between the two - easier to reason about at a glance with respect to function signatures and return types, easier to search for, etc.

We already had cases where the two names would collide, handled with:
pub use arrow::datatypes::DataType as ArrowDataType.

This PR formalises the distinction using that naming (following a quick sanity-check with @ritchie46).

Note

As you'd hope for something this size it is only a rename/refactor - no functional code/logic changed. The only reason the +/- on this PR shows positive is because the extra length of "ArrowDataType" vs "DataType" sometimes causes the formatting to break across extra lines, like so:

diff_example

@alexander-beedie alexander-beedie changed the title refactor(rust): rename DataType in the polars-arrow crate to ArrowDataType for clarity, preventing conflation with our own/native polars DataType refactor(rust): rename the DataType in the polars-arrow crate to ArrowDataType for clarity, preventing conflation with our own/native polars DataType Nov 14, 2023
@github-actions github-actions bot added internal An internal refactor or improvement rust Related to Rust Polars labels Nov 14, 2023
@alexander-beedie alexander-beedie marked this pull request as draft November 14, 2023 20:31
…DataType` for clarity, preventing conflation with our own/native polars `DataType`
@alexander-beedie alexander-beedie force-pushed the polars-arrow-datatype-name branch from 499c783 to 408194c Compare November 14, 2023 20:32
@alexander-beedie alexander-beedie marked this pull request as ready for review November 14, 2023 20:46
@alexander-beedie alexander-beedie changed the title refactor(rust): rename the DataType in the polars-arrow crate to ArrowDataType for clarity, preventing conflation with our own/native polars DataType refactor(rust): rename the DataType in the polars-arrow crate to ArrowDataType for clarity, preventing conflation with our own/native DataType Nov 14, 2023
@ritchie46 ritchie46 merged commit 5017d14 into pola-rs:main Nov 15, 2023
27 checks passed
@alexander-beedie alexander-beedie deleted the polars-arrow-datatype-name branch November 15, 2023 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal An internal refactor or improvement rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants