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

Add overload to Array::create that explicitly accepts a context. #5325

Merged
merged 2 commits into from
Oct 2, 2024

Conversation

teo-tsirpanis
Copy link
Member

SC-42521

The Array::create function uses the context that was used when creating its ArraySchema. This is unintuitive and inflexible, and this PR fixes it by adding an overload that explicitly accepts a context.

Per discussions the existing overload is not deprecated, but users are recommended to explicitly pass a context when creating an array whenever possible.


TYPE: CPP_API
DESC: Add overload to the Array::create function that explicitly accepts a context.

@kounelisagis
Copy link
Member

Shouldn't we have a test for the new overload?

@teo-tsirpanis
Copy link
Member Author

Updated all C++ examples and usages in unit-cppapi-array.cc. I think this would provide adequate test coverage for both the old and new API.

@kounelisagis
Copy link
Member

Updated all C++ examples and usages in unit-cppapi-array.cc. I think this would provide adequate test coverage for both the old and new API.

Yes, I agree. We need to test both.

Copy link
Member

@kounelisagis kounelisagis left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@teo-tsirpanis teo-tsirpanis merged commit 4418b8a into dev Oct 2, 2024
63 checks passed
@teo-tsirpanis teo-tsirpanis deleted the teo/array-create-ctx branch October 2, 2024 17:08
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.

2 participants