-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
test: Port tests in partitioned_csv.rs
to sqllogictest
#8919
Conversation
@@ -482,7 +482,7 @@ async fn sort_on_window_null_string() -> Result<()> { | |||
async fn test_prepare_statement() -> Result<()> { | |||
let tmp_dir = TempDir::new()?; | |||
let partition_count = 4; | |||
let ctx = partitioned_csv::create_ctx(&tmp_dir, partition_count).await?; | |||
let ctx = create_ctx_with_partition(&tmp_dir, partition_count).await?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same code existed in partitioned_csv.rs
and mod.rs
- dropped the former and replaced with function calls to mod.rs
@@ -63,3 +63,76 @@ id6 value"6 | |||
id7 value"7 | |||
id8 value"8 | |||
id9 value"9 | |||
|
|||
|
|||
# Read partitioned csv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
partitioned_csv.rs
did not have any unit tests so I created a new one to test reading from partitioned csv files.
use tempfile::TempDir; | ||
|
||
/// Generate CSV partitions within the supplied directory | ||
fn populate_csv_partitions( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The exact same setup code exists in mod.rs
so deleted this one here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @simicd -- this looks great
Which issue does this PR close?
Closes #8208
Rationale for this change
Migrate tests from Rust to sqllogictest
What changes are included in this PR?
partitioned_csv.rs
csv_files.slt
Are these changes tested?
Yes
Are there any user-facing changes?
No