alamb commented on code in PR #14543:
URL: https://github.com/apache/datafusion/pull/14543#discussion_r1947153941
##########
datafusion/core/src/datasource/data_source.rs:
##########
@@ -62,4 +62,8 @@ pub trait FileSource: Send + Sync {
fn fmt_extra(&self, _t: DisplayFormatType, _f: &mut Formatter) ->
fmt::Result {
Ok(())
}
+ /// Check if repartition is supported
+ fn supports_repartition(&self, config: &FileScanConfig) -> bool {
+ !(config.file_compression_type.is_compressed() ||
config.new_lines_in_values)
+ }
Review Comment:
I think it would be better we did not provide a default implementation for
`supports_repartition`
Assuming that a file source can repartition based on its compression and
newlines seems very specific to CSV.
```suggestion
/// Check if repartition is supported
fn supports_repartition(&self, config: &FileScanConfig) -> bool;
```
--
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]