mesejo commented on code in PR #824:
URL: https://github.com/apache/datafusion-python/pull/824#discussion_r1723000259
##########
src/context.rs:
##########
@@ -833,13 +829,16 @@ impl PySessionContext {
.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);
Review Comment:
This line sets the `options.schema'; it is equivalent to the lines (that
were deleted),
```rust
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
needs to be checked to support both list and string.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]