Skip to content

Commit

Permalink
Improve, reduce emphasis on Read/Write/Seek
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Jan 15, 2025
1 parent 3e8c95a commit a335701
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 17 deletions.
5 changes: 2 additions & 3 deletions arrow-ipc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@
//! data to files and over the network.
//!
//! There are two variants of the IPC format:
//! 1. [IPC Streaming Format]: A sequence of bytes, implemented by
//! 1. [IPC Streaming Format]: Supports streaming data sources, implemented by
//! [StreamReader] and [StreamWriter]
//!
//! 2. [IPC File Format]: Extension of the streaming format that allows
//! random access for seekable sources, implemented by [FileReader] and
//! 2. [IPC File Format]: Supports random access, implemented by [FileReader] and
//! [FileWriter].
//!
//! See the [`reader`] and [`writer`] modules for more information.
Expand Down
16 changes: 7 additions & 9 deletions arrow-ipc/src/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -997,15 +997,15 @@ impl FileReaderBuilder {
}
}

/// Arrow File reader
/// Arrow File Reader
///
/// Reads Arrow [`RecordBatch`]es from data in the [IPC File Format] from
/// anything that implements [Read] and [Seek].
/// Reads Arrow [`RecordBatch`]es from bytes in the [IPC File Format],
/// providing random access to the record batches.
///
/// # See Also
///
/// * [`Self::set_index`] for random access
/// * [`StreamReader`] for a source that doesn't require seeking.
/// * [`StreamReader`] for a reading streaming data
///
/// # Example
/// ```
Expand Down Expand Up @@ -1170,15 +1170,13 @@ impl<R: Read + Seek> RecordBatchReader for FileReader<R> {
}
}

/// Arrow Stream reader
/// Arrow Stream Reader
///
/// Reads Arrow [`RecordBatch`]es from data in the [IPC Streaming Format] from
/// anything that implements [Read]. Note the source does *not* need to
/// implement [Seek].
/// Reads Arrow [`RecordBatch`]es from bytes in the [IPC Streaming Format].
///
/// # See Also
///
/// * [`FileReader`] for a source that allows random access.
/// * [`FileReader`] for random access.
///
/// # Example
/// ```
Expand Down
16 changes: 11 additions & 5 deletions arrow-ipc/src/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -911,8 +911,11 @@ impl DictionaryTracker {

/// Arrow File Writer
///
/// Writes Arrow [`RecordBatch`]es in the [IPC File Format] to anything
/// that implements [Write].
/// Writes Arrow [`RecordBatch`]es in the [IPC File Format].
///
/// # See Also
///
/// * [`StreamWriter`] for writing IPC Streams
///
/// # Example
/// ```
Expand Down Expand Up @@ -1159,10 +1162,13 @@ impl<W: Write> RecordBatchWriter for FileWriter<W> {
}
}

/// Arrow Writer for an IPC stream
/// Arrow Stream Writer
///
/// Writes Arrow [`RecordBatch`]es to bytes using the [IPC Streaming Format].
///
/// # See Also
///
/// Writes Arrow [`RecordBatch`]es in the [IPC Streaming Format] to anything
/// that implements [Write].
/// * [`FileWriter`] for writing IPC Files
///
/// # Example
/// ```
Expand Down

0 comments on commit a335701

Please sign in to comment.