Skip to content

Conversation

@mesejo
Copy link
Contributor

@mesejo mesejo commented Aug 19, 2024

Which issue does this PR close?

N/A

Rationale for this change

Enable users to supply a list of csv file paths to the read_csv function, inspired by this issue: ibis-project/ibis#9866.

What changes are included in this PR?

Changes to the read_csv function in Rust and the corresponding signature types in Python

Are there any user-facing changes?

Yes

Copy link
Member

@timsaucer timsaucer left a comment

Choose a reason for hiding this comment

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

Overall looks like a nice addition.

.file_extension(file_extension)
.table_partition_cols(convert_table_partition_cols(table_partition_cols)?)
.file_compression_type(parse_file_compression_type(file_compression_type)?);
options.schema = schema.as_ref().map(|x| &x.0);
Copy link
Member

Choose a reason for hiding this comment

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

What is this line for?

Copy link
Contributor Author

@mesejo mesejo Aug 20, 2024

Choose a reason for hiding this comment

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

This line sets the options.schema; it is equivalent to the lines (that were deleted),

if let Some(py_schema) = schema {
    options.schema = Some(&py_schema.0);

I chose to do it this way to remove a nested conditional since the type must be checked to support list and string.

Copy link
Member

@andygrove andygrove left a comment

Choose a reason for hiding this comment

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

Thanks @mesejo and @timsaucer

@andygrove andygrove merged commit 805183b into apache:main Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants