Skip to content

[datalake] add missing file and directory methods #853

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

Merged
merged 3 commits into from
Jul 5, 2022

Conversation

roeap
Copy link
Contributor

@roeap roeap commented Jun 25, 2022

This PR adds the last remaining methods to the file and directory clients.

From what I can tell the last missing functionality is leases, but I left those for a follow-up PR, since they seem to be usually implemented using a dedicated client.

towards #802, #496

Comment on lines +17 to +21
impl From<BTreeMap<Cow<'static, str>, Cow<'static, str>>> for Properties {
fn from(value: BTreeMap<Cow<'static, str>, Cow<'static, str>>) -> Self {
Self(value)
}
}
Copy link
Contributor Author

@roeap roeap Jun 25, 2022

Choose a reason for hiding this comment

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

Thought about providing a more flexible implementation, like

impl<T> From<T> for Properties
where
    T: Into<BTreeMap<Cow<'static, str>, Cow<'static, str>>>,
{
    fn from(value: T) -> Self {
        Self(value.into())
    }
}

however that conflicts with the TryFrom<&Headers> implementation, which needs to look into a specific header key. Not sure if this is that important here, but maybe we can remove the conflicting trait implementations since they are used to convert responses - i.e. no added convenience for the user - vs. adding convenience in the user facing methods...

@rylev rylev requested a review from thovoll June 27, 2022 11:44
Copy link
Contributor

@ctaggart ctaggart left a comment

Choose a reason for hiding this comment

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

Thanks @roeap. I'm not an expert here. It looks fine to me.

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.

3 participants