Skip to content

Commit 6f03c1d

Browse files
committed
docs: use Arrow array type names
Signed-off-by: cl <cailue@apache.org>
1 parent 22940d1 commit 6f03c1d

4 files changed

Lines changed: 12 additions & 11 deletions

File tree

‎encodings/fsst/src/canonical.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ pub(crate) fn fsst_decode_bytes(
6868
len == total_size,
6969
"FSST decoded {len} bytes, expected {total_size}"
7070
);
71+
// SAFETY: `decompress_into` initialized the first `len` bytes.
7172
unsafe { uncompressed_bytes.set_len(len) };
7273
Ok((uncompressed_bytes, uncompressed_lens_array))
7374
}

‎vortex-array/src/arrays/varbin/builder.rs‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,11 @@ impl<O: IntegerPType> VarBinBuilder<O> {
191191
}
192192
}
193193

194-
/// Builder for offset-based UTF-8 and binary arrays with either 32-bit or 64-bit offsets.
194+
/// Builder for UTF-8 and binary [`VarBinArray`] values.
195195
///
196-
/// Unlike [`crate::builders::VarBinViewBuilder`], this builder produces a [`VarBinArray`].
197-
/// Encodings can downcast an [`ArrayBuilder`] to this type and decode directly into Arrow's
198-
/// offset-based physical representation without first materializing a view array.
196+
/// Unlike [`crate::builders::VarBinViewBuilder`], this builder stores 32-bit or 64-bit offsets.
197+
/// Encodings can decode into this builder without first creating a
198+
/// [`VarBinViewArray`](crate::arrays::VarBinViewArray).
199199
pub struct VarBinBufferBuilder {
200200
dtype: DType,
201201
storage: TypedBuilder,
@@ -270,7 +270,7 @@ impl VarBinBufferBuilder {
270270
Ok(())
271271
}
272272

273-
/// Appends an existing offset-based Vortex array without constructing views.
273+
/// Appends an existing [`VarBinArray`] without constructing views.
274274
pub fn append_varbin(
275275
&mut self,
276276
array: crate::ArrayView<'_, VarBin>,
@@ -296,7 +296,7 @@ impl VarBinBufferBuilder {
296296
Ok(())
297297
}
298298

299-
/// Appends a Vortex view array into the offset-based output.
299+
/// Appends a [`VarBinViewArray`](crate::arrays::VarBinViewArray).
300300
pub fn append_varbinview(
301301
&mut self,
302302
array: crate::ArrayView<'_, VarBinView>,

‎vortex-python/python/vortex/file.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ def to_arrow(
216216
batch_size : :class:`int` | None
217217
The number of rows to read per chunk.
218218
schema : :class:`pyarrow.Schema` | None
219-
The Arrow physical schema to return. Use ``pyarrow.string()`` and
220-
``pyarrow.binary()`` fields to request offset-based arrays instead of view arrays.
219+
The Arrow schema to return. Use ``pyarrow.string()`` for ``StringArray`` fields.
220+
Use ``pyarrow.binary()`` for ``BinaryArray`` fields.
221221
222222
"""
223223
return self._file.to_arrow(

‎vortex-python/src/arrays/mod.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,8 @@ impl PyArray {
435435
/// Parameters
436436
/// ----------
437437
/// arrow_type : :class:`pyarrow.DataType`, optional
438-
/// The Arrow physical type to return. When omitted, Vortex chooses its preferred type,
439-
/// including ``string_view`` and ``binary_view`` for UTF-8 and binary arrays.
438+
/// The Arrow type to return. By default, UTF-8 data returns a ``StringViewArray`` and
439+
/// binary data returns a ``BinaryViewArray``.
440440
///
441441
/// Returns
442442
/// -------
@@ -457,7 +457,7 @@ impl PyArray {
457457
/// 3
458458
/// ]
459459
/// ```
460-
/// Export an offset-based Arrow string array instead of the default string-view array:
460+
/// Export a ``StringArray`` instead of a ``StringViewArray``:
461461
///
462462
/// ```python
463463
/// >>> import pyarrow

0 commit comments

Comments
 (0)