zhuliquan commented on code in PR #13610:
URL: https://github.com/apache/datafusion/pull/13610#discussion_r1865982127


##########
datafusion/core/src/test_util/parquet.rs:
##########
@@ -103,7 +103,17 @@ impl TestParquetFile {
 
         let size = std::fs::metadata(&path)?.len() as usize;
 
-        let canonical_path = path.canonicalize()?;
+        let mut canonical_path = path.canonicalize()?;
+
+        if cfg!(target_os = "windows") {
+            canonical_path = canonical_path

Review Comment:
   I'm not sure it, I also suspect it in PR #11575. However, this case run ok 
on my windows machine, and when I remove the code referenced above, this case 
can't be ok (got below error).
   ```text
   thread 'parquet::filter_pushdown::single_file' panicked at 
datafusion\core\tests\parquet\filter_pushdown.rs:516:66:
   called `Result::unwrap()` on an `Err` value: ParquetError(External(Generic { 
store: "LocalFileSystem", source: InvalidUrl { url: Url { scheme: "file", 
cannot_be_a_base: false, username: "", password: None, host: None, port: None, 
path: 
"/%5C%5C%3F%5CD:%5Cworkspace%5Crust%5Cgithub.com%5Czhuliquan%5Cdatafusion%5Cdatafusion%5Ccore%5C.tmpoyfZYi%5Cdata.parquet",
 query: None, fragment: None } } }))
   stack backtrace:
      0: rust_begin_unwind
                at 
/rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14\library/std\src/panicking.rs:662:5
      1: core::panicking::panic_fmt
                at 
/rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14\library/core\src/panicking.rs:74:14
      2: core::result::unwrap_failed
                at 
/rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14\library/core\src/result.rs:1677:5
      3: core::result::Result<T,E>::unwrap
                at 
/rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14\library\core\src/result.rs:1102:23
      4: 
parquet_exec::parquet::filter_pushdown::TestCase::read_with_options::{{closure}}
                at .\tests\parquet\filter_pushdown.rs:516:22
      5: 
parquet_exec::parquet::filter_pushdown::TestCase::run_with_filter::{{closure}}
                at .\tests\parquet\filter_pushdown.rs:448:14
      6: parquet_exec::parquet::filter_pushdown::TestCase::run::{{closure}}
                at .\tests\parquet\filter_pushdown.rs:433:43
      7: parquet_exec::parquet::filter_pushdown::single_file::{{closure}}
                at .\tests\parquet\filter_pushdown.rs:85:16
      8: <core::pin::Pin<P> as core::future::future::Future>::poll
                at 
/rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14\library\core\src\future/future.rs:123:9
      9: <core::pin::Pin<P> as core::future::future::Future>::poll
                at 
/rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14\library\core\src\future/future.rs:123:9
     10: 
tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}::{{closure}}
                at 
C:\Users\zlq16\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\tokio-1.40.0\src\runtime\scheduler\current_thread\mod.rs:696:57
     11: tokio::runtime::coop::with_budget
                at 
C:\Users\zlq16\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\tokio-1.40.0\src\runtime\coop.rs:107:5
     12: tokio::runtime::coop::budget
                at 
C:\Users\zlq16\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\tokio-1.40.0\src\runtime\coop.rs:73:5
     13: 
tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}
                at 
C:\Users\zlq16\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\tokio-1.40.0\src\runtime\scheduler\current_thread\mod.rs:696:25
     14: tokio::runtime::scheduler::current_thread::Context::enter
                at 
C:\Users\zlq16\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\tokio-1.40.0\src\runtime\scheduler\current_thread\mod.rs:423:19
     15: 
tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}
                at 
C:\Users\zlq16\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\tokio-1.40.0\src\runtime\scheduler\current_thread\mod.rs:695:36
     16: 
tokio::runtime::scheduler::current_thread::CoreGuard::enter::{{closure}}
                at 
C:\Users\zlq16\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\tokio-1.40.0\src\runtime\scheduler\current_thread\mod.rs:774:68
     17: tokio::runtime::context::scoped::Scoped<T>::set
                at 
C:\Users\zlq16\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\tokio-1.40.0\src\runtime\context\scoped.rs:40:9
     18: tokio::runtime::context::set_scheduler::{{closure}}
                at 
C:\Users\zlq16\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\tokio-1.40.0\src\runtime\context.rs:180:26
     19: std::thread::local::LocalKey<T>::try_with
                at 
/rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14\library\std\src\thread/local.rs:283:12
     20: std::thread::local::LocalKey<T>::with
                at 
/rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14\library\std\src\thread/local.rs:260:9
     21: tokio::runtime::context::set_scheduler
                at 
C:\Users\zlq16\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\tokio-1.40.0\src\runtime\context.rs:180:9
     22: tokio::runtime::scheduler::current_thread::CoreGuard::enter
                at 
C:\Users\zlq16\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\tokio-1.40.0\src\runtime\scheduler\current_thread\mod.rs:774:27
     23: tokio::runtime::scheduler::current_thread::CoreGuard::block_on
                at 
C:\Users\zlq16\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\tokio-1.40.0\src\runtime\scheduler\current_thread\mod.rs:683:19
     24: 
tokio::runtime::scheduler::current_thread::CurrentThread::block_on::{{closure}}
                at 
C:\Users\zlq16\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\tokio-1.40.0\src\runtime\scheduler\current_thread\mod.rs:191:28
     25: tokio::runtime::context::runtime::enter_runtime
                at 
C:\Users\zlq16\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\tokio-1.40.0\src\runtime\context\runtime.rs:65:16
     26: tokio::runtime::scheduler::current_thread::CurrentThread::block_on
                at 
C:\Users\zlq16\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\tokio-1.40.0\src\runtime\scheduler\current_thread\mod.rs:179:9
     27: tokio::runtime::runtime::Runtime::block_on_inner
                at 
C:\Users\zlq16\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\tokio-1.40.0\src\runtime\runtime.rs:361:47
     28: tokio::runtime::runtime::Runtime::block_on
                at 
C:\Users\zlq16\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\tokio-1.40.0\src\runtime\runtime.rs:335:13
     29: parquet_exec::parquet::filter_pushdown::single_file
                at .\tests\parquet\filter_pushdown.rs:223:5
     30: parquet_exec::parquet::filter_pushdown::single_file::{{closure}}
                at .\tests\parquet\filter_pushdown.rs:69:23
     31: core::ops::function::FnOnce::call_once
                at 
/rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14\library\core\src\ops/function.rs:250:5
     32: core::ops::function::FnOnce::call_once
                at 
/rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14\library/core\src\ops/function.rs:250:5
   note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose 
backtrace.
   error: test failed, to rerun pass `--test parquet_exec`
   ```



-- 
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]

Reply via email to