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

Groups API + Tests + Example v2 #69

Merged
merged 35 commits into from
Apr 29, 2024

Conversation

abigalekim
Copy link
Contributor

No description provided.

Copy link
Member

@rroelke rroelke left a comment

Choose a reason for hiding this comment

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

Seems like a lot of the comments I left on the previous PR still apply here.

@abigalekim abigalekim changed the base branch from main to abigalekim/sc-43477/groups-api-example April 24, 2024 08:08
@abigalekim abigalekim changed the base branch from abigalekim/sc-43477/groups-api-example to main April 24, 2024 08:08
@abigalekim abigalekim force-pushed the pd/abigalekim/sc-43477/groups-api-example branch from 577ca5b to 8d8818d Compare April 24, 2024 08:13
}

pub fn consolidate_metadata<S>(
&self,
Copy link
Member

Choose a reason for hiding this comment

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

This C API doc doesn't mention anything about the group open mode but this sure sounds like a mutating function call...

Anyway, as I've been mulling over the whole "some methods are &mut self and some aren't" thing, it's kind of occurred to me that &mut self to represent a write mode method doesn't really work because the API allows you to just get another handle, and then you have ownership of that second handle and can call whatever you want anyway. And this can go in the direction of "just let the C API give back the error and don't worry about it" or in the direction of "embed the permissions to call certain APIs in the type system". If we had infinite time I'd want the latter but let's move ahead with the former for now.

@abigalekim abigalekim force-pushed the pd/abigalekim/sc-43477/groups-api-example branch from c04d7f3 to 26a6d66 Compare April 25, 2024 03:59
@abigalekim abigalekim requested review from rroelke and davisp April 25, 2024 20:48
@abigalekim
Copy link
Contributor Author

Float64Value(Vec<f64>),
//StringAsciiValue(CString),
//BooleanValue(bool),
// maybe blobs?
Copy link
Collaborator

Choose a reason for hiding this comment

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

Lets remove commented out code here.

Copy link
Collaborator

@davisp davisp left a comment

Choose a reason for hiding this comment

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

Skimming this, I'm not seeing anything of concern. Just the one minor nit. I'll defer to @rroelke to approve since he's reviewed this more than me.

.capi_return(unsafe {
ffi::tiledb_group_is_open(c_context, raw_group.ffi, &mut c_open)
})
.expect("TileDB internal error when checking for open group.");
Copy link
Member

Choose a reason for hiding this comment

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

expect isn't appropriate here since we can return Result

also I think you can remove this if you want, your comment yesterday (earlier this week? something) in Drop convinced me that you did it correctly the first time

Copy link
Member

@rroelke rroelke left a comment

Choose a reason for hiding this comment

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

All righty!
Looks like there are two final comments but they should be pretty trivial to address.
Let's get this in there, nice work!

@abigalekim abigalekim merged commit 0978744 into main Apr 29, 2024
2 checks passed
@abigalekim abigalekim deleted the pd/abigalekim/sc-43477/groups-api-example branch April 29, 2024 21: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.

None yet

3 participants