alamb commented on code in PR #11633:
URL: https://github.com/apache/datafusion/pull/11633#discussion_r1690319429
##########
datafusion/core/src/datasource/physical_plan/csv.rs:
##########
@@ -67,27 +87,124 @@ pub struct CsvExec {
cache: PlanProperties,
}
-impl CsvExec {
- /// Create a new CSV reader execution plan provided base and specific
configurations
- #[allow(clippy::too_many_arguments)]
- pub fn new(
- base_config: FileScanConfig,
- has_header: bool,
- delimiter: u8,
- quote: u8,
- escape: Option<u8>,
- comment: Option<u8>,
- newlines_in_values: bool,
+/// Builder for [`CsvExec`].
+///
+/// See example on [`CsvExec`].
+#[derive(Debug, Clone)]
+pub struct CsvExecBuilder {
+ file_scan_config: FileScanConfig,
+ file_compression_type: FileCompressionType,
+ // TODO: it seems like these format options could be reused across all the
various CSV config
Review Comment:
We could possibly use
https://docs.rs/datafusion/latest/datafusion/config/struct.CsvOptions.html
directly
That seems to be what the parquet writer does
https://docs.rs/datafusion/latest/datafusion/datasource/physical_plan/parquet/struct.ParquetExec.html#method.table_parquet_options
(aka the ParquetExec directly uses the options struct)
Perhaps as a follow on PR
--
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]