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

Make downcast macros hygenic (#6400) #6620

Merged
merged 5 commits into from
Nov 8, 2024
Merged

Conversation

tustvold
Copy link
Contributor

Which issue does this PR close?

Closes #6400

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

@github-actions github-actions bot added the arrow Changes to the arrow crate label Oct 24, 2024
@@ -21,6 +21,11 @@ use crate::array::*;
use crate::types::*;
use arrow_data::ArrayData;

#[doc(hidden)]
pub mod __private {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the module name that serde uses for this purpose

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @tustvold -- this looks good to me -- it might also be worth adding some tests. Perhaps you can follow @crepererum 's model in DataFusion

https://github.com/apache/datafusion/blob/main/datafusion/core/tests/macro_hygiene/mod.rs

arrow-array/src/cast.rs Show resolved Hide resolved
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
@crepererum
Copy link
Contributor

needs a formatting fix

@alamb
Copy link
Contributor

alamb commented Nov 8, 2024

I pushed a fix for fmt to the branch to get CI passing and will merge after that

@alamb alamb merged commit 7f86ea4 into apache:master Nov 8, 2024
26 checks passed
@alamb
Copy link
Contributor

alamb commented Nov 8, 2024

Thanks again @tustvold and @crepererum

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.

downcast_primitive_array and downcast_dictionary_array are not hygienic wrt imports
3 participants