tustvold commented on code in PR #2572:
URL: https://github.com/apache/arrow-datafusion/pull/2572#discussion_r876064584
##########
datafusion/core/src/datasource/listing/mod.rs:
##########
@@ -88,11 +88,12 @@ impl std::fmt::Display for PartitionedFile {
}
}
-/// Helper method to fetch the file size and date at given path and create a
`FileMeta`
-pub fn local_unpartitioned_file(file: String) -> PartitionedFile {
- PartitionedFile {
- file_meta: local::local_unpartitioned_file(file),
- partition_values: vec![],
- range: None,
+impl From<FileMeta> for PartitionedFile {
Review Comment:
This not only makes for reduced verbosity, but avoids a confusing situation
where there are two local_unpartitioned_file, one which returns FileMeta and
one which returns PartitionedFile
--
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]