adriangb commented on code in PR #17076:
URL: https://github.com/apache/datafusion/pull/17076#discussion_r2261897103
##########
datafusion-examples/examples/csv_json_opener.rs:
##########
@@ -68,10 +68,9 @@ async fn csv_opener() -> Result<()> {
let config = CsvSource::new(true, b',', b'"')
.with_comment(Some(b'#'))
.with_schema(schema)
Review Comment:
These sources may need builders or some arguments moved to `new()` to avoid
`Option<>.expect()`s
##########
datafusion/datasource/src/file.rs:
##########
@@ -58,11 +58,10 @@ pub trait FileSource: Send + Sync {
object_store: Arc<dyn ObjectStore>,
base_config: &FileScanConfig,
partition: usize,
+ batch_size: usize,
Review Comment:
My only qualm with this change is that it adds another argument to
`FileSource::create_file_opener` and it's not clear if this will be it or if
we're going to add 5 more and realize that it's a bad pattern. I *think* there
may be 1 more or something and that's it, in which case this is the simplest
and best way to do it I can think of, but if anyone has better ideas or thinks
there will be a proliferation of arguments here I'd be interested in your
thoughts.
--
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]