adriangb opened a new pull request, #18386:
URL: https://github.com/apache/datafusion/pull/18386
Most of these file source implementations cannot operate without schema,
they all have `.expect("schema must be set")`s that violate using the language
to enforce correctness.
This is an attempt to rework that by making it so you have to pass in a
schema to construct them.
That said there are downsides:
1. More boilerplate.
2. Requires that the schema passed into `FileScanConfig` and `FileSource`
match.
I feel like there's another twist to this needed... maybe moving the schema
out of `FileScanConfig`? That's not currently possible, it's used in both
places. Maybe having a `FileScan` and a `FileScanConfig` and having
construction be `FileScan::new(FileSource::new(config), config)`?
--
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]