From a335701576762e483fa73ba604fd99b808f4e4f6 Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Wed, 15 Jan 2025 06:04:25 -0500 Subject: [PATCH] Improve, reduce emphasis on Read/Write/Seek --- arrow-ipc/src/lib.rs | 5 ++--- arrow-ipc/src/reader.rs | 16 +++++++--------- arrow-ipc/src/writer.rs | 16 +++++++++++----- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/arrow-ipc/src/lib.rs b/arrow-ipc/src/lib.rs index c9606805d5a..4638abdb4ed 100644 --- a/arrow-ipc/src/lib.rs +++ b/arrow-ipc/src/lib.rs @@ -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. diff --git a/arrow-ipc/src/reader.rs b/arrow-ipc/src/reader.rs index 04825646e15..bbbbb48dea2 100644 --- a/arrow-ipc/src/reader.rs +++ b/arrow-ipc/src/reader.rs @@ -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 /// ``` @@ -1170,15 +1170,13 @@ impl RecordBatchReader for FileReader { } } -/// 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 /// ``` diff --git a/arrow-ipc/src/writer.rs b/arrow-ipc/src/writer.rs index d3d64286dd3..f250d8f1b8a 100644 --- a/arrow-ipc/src/writer.rs +++ b/arrow-ipc/src/writer.rs @@ -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 /// ``` @@ -1159,10 +1162,13 @@ impl RecordBatchWriter for FileWriter { } } -/// 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 /// ```