Skip to content

Commit

Permalink
[doc] cleanup comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rdettai committed Oct 4, 2021
1 parent 08f219d commit bc82996
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions datafusion/src/datasource/file_format/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,15 @@ use futures::{Stream, StreamExt};

use super::object_store::{ObjectStoreRegistry, SizedFile, SizedFileStream};

// /// A stream of String that can be used accross await calls
// pub type StringStream = Pin<Box<dyn Stream<Item = String> + Send + Sync>>;

// /// Convert a vector into a stream
// pub fn string_stream(strings: Vec<String>) -> StringStream {
// Box::pin(futures::stream::iter(strings))
// }

/// This trait abstracts all the file format specific implementations
/// from the `TableProvider`. This helps code re-utilization accross
/// providers that support the the same file formats.
#[async_trait]
pub trait FileFormat: Send + Sync {
/// Open the files at the paths provided by iterator and infer the
/// common schema
/// Infer the the common schema of the files described by the path stream
async fn infer_schema(&self, paths: SizedFileStream) -> Result<SchemaRef>;

/// Open the file at the given path and infer its statistics
/// Infer the statistics for the file at the given path
async fn infer_stats(&self, path: SizedFile) -> Result<Statistics>;

/// Take a list of files and convert it to the appropriate executor
Expand Down

0 comments on commit bc82996

Please sign in to comment.