File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed
datafusion/core/src/datasource Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,12 @@ pub struct StreamConfig {
104104
105105impl StreamConfig {
106106 /// Stream data from the file at `location`
107+ ///
108+ /// * Data will be read sequentially from the provided `location`
109+ /// * New data will be appended to the end of the file
110+ ///
111+ /// The encoding can be configured with [`Self::with_encoding`] and
112+ /// defaults to [`StreamEncoding::Csv`]
107113 pub fn new_file ( schema : SchemaRef , location : PathBuf ) -> Self {
108114 Self {
109115 schema,
@@ -180,11 +186,20 @@ impl StreamConfig {
180186 }
181187}
182188
183- /// A [`TableProvider`] for a stream source, such as a FIFO file
189+ /// A [`TableProvider`] for an unbounded stream source
190+ ///
191+ /// Currently only reading from / appending to a single file in-place is supported, but
192+ /// other stream sources and sinks may be added in future.
193+ ///
194+ /// Applications looking to read/write datasets comprising multiple files, e.g. [Hadoop]-style
195+ /// data stored in object storage, should instead consider [`ListingTable`].
196+ ///
197+ /// [Hadoop]: https://hadoop.apache.org/
198+ /// [`ListingTable`]: crate::datasource::listing::ListingTable
184199pub struct StreamTable ( Arc < StreamConfig > ) ;
185200
186201impl StreamTable {
187- /// Create a new [`StreamTable`] for the given `StreamConfig`
202+ /// Create a new [`StreamTable`] for the given [ `StreamConfig`]
188203 pub fn new ( config : Arc < StreamConfig > ) -> Self {
189204 Self ( config)
190205 }
You can’t perform that action at this time.
0 commit comments