zhuliquan commented on PR #13531:
URL: https://github.com/apache/datafusion/pull/13531#issuecomment-2495528989
> 🤔 the test now seems to be failing
>
> I wonder if it has to do with how the temp files are created 🤔
I noticed that the char '%' appears in the directory, and the Windows system
seems to be unable to find the file.
```
thread 'parquet::external_access_plan::two_selections' panicked at
datafusion\core\tests\parquet\external_access_plan.rs:289:10:
called `Result::unwrap()` on an `Err` value: ParquetError(External(NotFound
{ path:
"C:\\Users\\RUNNER%7E1\\AppData\\Local\\Temp\\user_access_planObCLIR.parquet",
source: Os { code: 3, kind: NotFound, message: "The system cannot find the path
specified." } }))
```
So I fix below code to avoid char '%'.
1. replacing '\\' to '/' when `target_os` is `windows`.
https://github.com/apache/datafusion/blob/b65d2a3a770596bc33d90f11a908ae29065068bf/datafusion/core/tests/parquet/external_access_plan.rs#L323-L328
Because, `Path::new` will replace '\\' to '\\%5C' in `PartitionedFile::new`.
https://github.com/apache/datafusion/blob/b65d2a3a770596bc33d90f11a908ae29065068bf/datafusion/core/tests/parquet/external_access_plan.rs#L330
and
https://github.com/apache/datafusion/blob/b65d2a3a770596bc33d90f11a908ae29065068bf/datafusion/core/src/datasource/listing/mod.rs#L90-L93
2. using current dir as temp file dir (Because `temp` dir in CI is located
at `C:\\Users\\RUNNER%7E1` and other loading parquet cases which are run ok on
windows also use data in `../../parquet-testing/data`), and remove temp file at
the end of the case run.
https://github.com/apache/datafusion/blob/b65d2a3a770596bc33d90f11a908ae29065068bf/datafusion/core/tests/parquet/external_access_plan.rs#L392
and
https://github.com/apache/datafusion/blob/b65d2a3a770596bc33d90f11a908ae29065068bf/datafusion/core/tests/parquet/external_access_plan.rs#L366
3. For sake of removing temp file at the end of each case run, I remove
singleton mode of TestData in `get_test_data`
https://github.com/apache/datafusion/blob/b65d2a3a770596bc33d90f11a908ae29065068bf/datafusion/core/tests/parquet/external_access_plan.rs#L382-L419
5.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]