Skip to content

Conversation

@vustef
Copy link

@vustef vustef commented Dec 8, 2025

Allow moving file-paths by specifying cached OpenDAL operator. This operator is used to as a "target" operator in this move. The FileIO should be built using the scheme of the source operator. E.g. if paths are S3 paths, but are moved to local file system, "target" should be LocalFS operator, while scheme should be "s3". See test_file_io_with_cached_operator for an example

inner: Arc<Storage>,

/// Cached operator to reuse for all operations.
/// When present, this operator will be used instead of calling create_operator.
Copy link
Author

Choose a reason for hiding this comment

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

I should document this better

&self,
path: &'a impl AsRef<str>,
) -> Result<(Operator, &'a str)> {
let (op, relative_path) = self.inner.create_operator(path)?;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we create the operator even when there's a cached one? Shouldn't this go into the else?

Copy link
Author

Choose a reason for hiding this comment

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

So that it can resolve relative path. It's hacky, I'll pause on this for now. I don't like that we have to specify what we're translating from, seems to me that the code should be detecting that...

@vustef vustef closed this Dec 10, 2025
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