alamb commented on code in PR #21261:
URL: https://github.com/apache/datafusion/pull/21261#discussion_r3011842221
##########
datafusion/datasource/src/file_stream/mod.rs:
##########
@@ -539,10 +535,13 @@ mod tests {
.with_limit(self.limit)
.build();
let metrics_set = ExecutionPlanMetricsSet::new();
- let file_stream =
- FileStream::new(&config, 0, Arc::new(self.opener),
&metrics_set)
- .unwrap()
- .with_on_error(on_error);
Review Comment:
FileStream was already starting to grow a builder interface as it gained
features, so let's just make it directly
##########
datafusion-examples/examples/custom_data_source/csv_json_opener.rs:
##########
@@ -80,8 +82,12 @@ async fn csv_opener() -> Result<()> {
.create_file_opener(object_store, &scan_config, 0)?;
let mut result = vec![];
- let mut stream =
- FileStream::new(&scan_config, 0, opener,
&ExecutionPlanMetricsSet::new())?;
+ let metrics = ExecutionPlanMetricsSet::new();
+ let mut stream = FileStreamBuilder::new(&scan_config)
Review Comment:
this illustrates the new API pretty well -- instead of a pile of arguments
to `FileStream::new` there is now `FileStreamBuilder`
--
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]