apache / datafusion

Apache DataFusion SQL Query Engine
https://datafusion.apache.org/
Apache License 2.0
6.19k stars 1.17k forks source link

Updating sqllogictests with `cargo test --test sqllogictests -- --complete` fails "failed to rename file from" #13142

Closed findepi closed 1 hour ago

findepi commented 2 hours ago

This should work

cargo test --test sqllogictests -- --complete

Currently, it does not:

$ cargo test --test sqllogictests -- --complete
...
Running "information_schema_columns.slt"
Running "unnest.slt"
Running "information_schema_multiple_catalogs.slt"
Running "map.slt"
Execution error: Error completing "string/string_view.slt": failed to rename file from test_files/string/string_query.slt.part.temp to test_files/string/./string_query.slt.part
Execution error: Error completing "string/large_string.slt": failed to rename file from test_files/string/string_query.slt.part.temp to test_files/string/./string_query.slt.part
Execution error: Error completing "string/dictionary_utf8.slt": failed to rename file from test_files/string/string_query.slt.part.temp to test_files/string/./string_query.slt.part
Error: Execution("3 failures")
error: test failed, to rerun pass `-p datafusion-sqllogictest --test sqllogictests`

Caused by:
  process didn't exit successfully: `.../target/debug/deps/sqllogictests-ab68b2841bcae5a2 --complete` (exit status: 1)
...

A workaround is to --complete only individual tests, which is cumbersome.

findepi commented 2 hours ago

proposed solution

fix completing with shared include files in upstream sqllogictests crate

proposed solution 2

provide a "sqllogictest complete" script that would invoke string tests sequentially thus avoiding the problem that they share include files

jayzhan211 commented 2 hours ago

Duplicated from #12752

findepi commented 1 hour ago

Thank you @jayzhan211 !