You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by vi...@apache.org on 2022/12/01 17:48:03 UTC

[arrow-rs] branch master updated: Better document implications of offsets (#3228) (#3243)

This is an automated email from the ASF dual-hosted git repository.

viirya pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git


The following commit(s) were added to refs/heads/master by this push:
     new 89a072e50 Better document implications of offsets (#3228) (#3243)
89a072e50 is described below

commit 89a072e50950a857f046451a477bc61fc9b8c5de
Author: Raphael Taylor-Davies <17...@users.noreply.github.com>
AuthorDate: Thu Dec 1 17:47:56 2022 +0000

    Better document implications of offsets (#3228) (#3243)
---
 arrow-schema/src/datatype.rs | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/arrow-schema/src/datatype.rs b/arrow-schema/src/datatype.rs
index 4162d41bf..da1c20ddb 100644
--- a/arrow-schema/src/datatype.rs
+++ b/arrow-schema/src/datatype.rs
@@ -149,21 +149,37 @@ pub enum DataType {
     /// days can differ in length during day light savings time transitions).
     Interval(IntervalUnit),
     /// Opaque binary data of variable length.
+    ///
+    /// A single Binary array can store up to [`i32::MAX`] bytes
+    /// of binary data in total
     Binary,
     /// Opaque binary data of fixed size.
     /// Enum parameter specifies the number of bytes per value.
     FixedSizeBinary(i32),
     /// Opaque binary data of variable length and 64-bit offsets.
+    ///
+    /// A single LargeBinary array can store up to [`i64::MAX`] bytes
+    /// of binary data in total
     LargeBinary,
-    /// A variable-length string in Unicode with UTF-8 encoding.
+    /// A variable-length string in Unicode with UTF-8 encoding
+    ///
+    /// A single Utf8 array can store up to [`i32::MAX`] bytes
+    /// of string data in total
     Utf8,
     /// A variable-length string in Unicode with UFT-8 encoding and 64-bit offsets.
+    ///
+    /// A single LargeUtf8 array can store up to [`i64::MAX`] bytes
+    /// of string data in total
     LargeUtf8,
     /// A list of some logical data type with variable length.
+    ///
+    /// A single List array can store up to [`i32::MAX`] elements in total
     List(Box<Field>),
     /// A list of some logical data type with fixed length.
     FixedSizeList(Box<Field>, i32),
     /// A list of some logical data type with variable length and 64-bit offsets.
+    ///
+    /// A single LargeList array can store up to [`i64::MAX`] elements in total
     LargeList(Box<Field>),
     /// A nested datatype that contains a number of sub-fields.
     Struct(Vec<Field>),