From 89a072e50950a857f046451a477bc61fc9b8c5de Mon Sep 17 00:00:00 2001 From: Raphael Taylor-Davies <1781103+tustvold@users.noreply.github.com> Date: Thu, 1 Dec 2022 17:47:56 +0000 Subject: [PATCH] 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 4162d41bf1b4..da1c20ddbd38 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), /// A list of some logical data type with fixed length. FixedSizeList(Box, 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), /// A nested datatype that contains a number of sub-fields. Struct(Vec),