saikrishna1-bidgely opened a new issue, #5024:
URL: https://github.com/apache/arrow-datafusion/issues/5024
**Is your feature request related to a problem or challenge? Please describe
what you are trying to do.**
This will make the code a bit cleaner and help with simpler code in #4908.
**Describe the solution you'd like**
We want to implement a trait `ReadOptions` which will implemented for
`CsvReadOptions` and other similar structs. The trait will be as follows:
```rust
pub trait ReadOptions<'a> {
/// Helper to convert these user facing options to `ListingTable` options
fn to_listing_options(&self, target_partitions: usize) -> ListingOptions;
///
async fn get_resolved_schema(
&self,
target_partitions: usize,
state: SessionState,
table_path: ListingTableUrl,
) -> Result<SchemaRef>;
}
```
**Describe alternatives you've considered**
Nothing here.
**Additional context**
This will help with simpler code in #4908.
--
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]