-
Notifications
You must be signed in to change notification settings - Fork 1.8k
test: Port tests in partitioned_csv.rs to sqllogictest
#8919
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
Conversation
| 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
| 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.
alamb
left a comment
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.rscsv_files.sltAre these changes tested?
Yes
Are there any user-facing changes?
No