Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore ability to run single SLT file #14355

Conversation

findepi
Copy link
Member

@findepi findepi commented Jan 29, 2025

Make it possible again to run single SLT file, even if it's name is a substring of other file(s).

For example, after the change, this command:

cargo test --test sqllogictests -- test_files/union.slt

runs union.slt file, but does not run pg_compat_union.slt.

The functionality was probably accidentally lost probably in #13936

cc @Omega359

@findepi findepi added the sqllogictest SQL Logic Tests (.slt) label Jan 29, 2025
@findepi findepi requested review from alamb and jonahgao January 29, 2025 10:20
Make it possible again to run single SLT file, even if it's name is a
substring of other file(s).

For example, after the change, this command:

   cargo test --test sqllogictests -- test_files/union.slt

runs `union.slt` file, but does not run `pg_compat_union.slt`.
@findepi findepi force-pushed the findepi/restore-ability-to-run-single-slt-file-fdfe98 branch from a13c085 to b0acc30 Compare January 29, 2025 12:53
@Omega359
Copy link
Contributor

I made a small PR to your branch to show the # of files tested, verifying that

cargo test --test sqllogictests -- union.slt

runs 2 files whereas

cargo test --test sqllogictests -- test_files/union.slt

runs 1 file.

I also verified that the sqlite tests ran without issues.

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @findepi ! I verified this PR using #14359

Before this PR

andrewlamb@Andrews-MacBook-Pro-2:~/Software/datafusion$ cargo test --test sqllogictests  -- test_files/union.slt
   Compiling datafusion-sqllogictest v44.0.0 (/Users/andrewlamb/Software/datafusion/datafusion/sqllogictest)
    Finished `test` profile [unoptimized + debuginfo] target(s) in 1.14s
     Running bin/sqllogictests.rs (target/debug/deps/sqllogictests-3d953efd822e1e41)
Completed 0 tests in 0 seconds

After this PR it does

andrewlamb@Andrews-MacBook-Pro-2:~/Software/datafusion$ cargo test --test sqllogictests  -- test_files/union.slt
   Compiling datafusion-sqllogictest v44.0.0 (/Users/andrewlamb/Software/datafusion/datafusion/sqllogictest)
    Finished `test` profile [unoptimized + debuginfo] target(s) in 1.53s
     Running bin/sqllogictests.rs (target/debug/deps/sqllogictests-3d953efd822e1e41)
Completed 1 tests in 0 seconds

@alamb
Copy link
Contributor

alamb commented Jan 29, 2025

The functionality was probably accidentally lost probably in #13936

BTW I think it is currently possible to run a single file. For example this will run both union.slt and pg_compat_union.slt.

cargo test --test sqllogictests -- union.slt

However, it only matches on the file name (not the entire path) so using test_files/union.slt does not work as you observe

I made a small PR to your branch to show the # of files tested, verifying that

LOL we did the same thing @Omega359

@alamb alamb merged commit 5897438 into apache:main Jan 29, 2025
25 checks passed
@alamb
Copy link
Contributor

alamb commented Jan 29, 2025

Thanks again @findepi

@findepi
Copy link
Member Author

findepi commented Jan 29, 2025

thank you @Omega359 @alamb !

@findepi findepi deleted the findepi/restore-ability-to-run-single-slt-file-fdfe98 branch January 29, 2025 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sqllogictest SQL Logic Tests (.slt)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants