TheR1sing3un opened a new pull request, #398:
URL: https://github.com/apache/paimon-rust/pull/398

   ### Purpose
   
   Linked issue: close #397
   
   The local `FileIO` (`fs` storage) corrupts absolute Windows paths. 
`fs_relative_path` turned an absolute path into the path opendal joins onto its 
`/` root by dropping the first character — correct for POSIX (`/tmp/wh` -> 
`tmp/wh`), but on Windows it drops the **drive letter** (`C:\wh` -> `:\wh`), so 
every local-catalog operation fails with `invalid filename (os error 123)`. 
This is why the `filesystem`/`factory`/`manifest` tests were gated behind 
`#[cfg(not(windows))]`. Java Paimon does not have this bug — its `Path` 
(modeled on Hadoop) keeps the drive letter and normalizes separators.
   
   ### Brief change log
   
   - `fs_relative_path` now returns `Cow<str>`: keeps the drive specifier and 
only normalizes `\`->`/` for Windows paths (opendal's 
`PathBuf::from("/").join("C:/wh")` rebuilds the real `C:\wh`); POSIX behavior 
is byte-identical.
   - `Storage::create` returns `(Operator, Cow<str>)`.
   - `InputFile`/`OutputFile` store the relative path string instead of 
re-slicing the original (which would discard the normalization).
   - Removed the three `#[cfg(not(windows))]` test gates so Windows CI now 
exercises the local FileIO.
   
   ### Tests
   
   - New unit tests for `fs_relative_path` (POSIX, `file:` scheme, Windows 
drive, mixed separators).
   - The previously Windows-gated `filesystem`/`factory`/`manifest` suites now 
run on Windows CI.
   
   ### API and Format
   
   No public API or storage-format change (the changed `InputFile`/`OutputFile` 
field is private).
   
   ### Documentation
   
   N/A.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to