Skip to content

Apache DataFusion SQL Query Engine

ARROW-271: Update Field structure to be more explicit

Julien Le Dem4e6962d7dd08
diff --git a/format/Message.fbs b/format/Message.fbs
index 71428b5810..9c95724897 100644
--- a/format/Message.fbs
+++ b/format/Message.fbs
@@ -92,17 +92,31 @@ union Type {
JSONScalar
}
+/// ----------------------------------------------------------------------
+/// The possible types of a vector
+
enum VectorType: short {
- /// used in List type Dense Union and variable length primitive types (String, Binary)
+ /// used in List type, Dense Union and variable length primitive types (String, Binary)
OFFSET,
- /// fixed length primitive values
- VALUES,
- /// Bit vector indicated if each value is null
+ /// actual data, either wixed width primitive types in slots or variable width delimited by an OFFSET vector
+ DATA,
+ /// Bit vector indicating if each value is null
VALIDITY,
/// Type vector used in Union type
TYPE
}
+/// ----------------------------------------------------------------------
+/// represents the physical layout of a buffer
+/// buffers have fixed width slots of a given type
+
+table VectorLayout {
+ /// the width of a slot in the buffer (typically 1, 8, 16, 32 or 64)
+ bit_width: short;
+ /// the purpose of the vector
+ type: VectorType;
+}
+
/// ----------------------------------------------------------------------
/// A field represents a named column in a record / row batch or child of a
/// nested type.
@@ -121,10 +135,10 @@ table Field {
dictionary: long;
// children apply only to Nested data types like Struct, List and Union
children: [Field];
- /// the buffers produced for this type (as derived from the Type)
+ /// layout of buffers produced for this type (as derived from the Type)
/// does not include children
/// each recordbatch will return instances of those Buffers.
- buffers: [ VectorType ];
+ layout: [ VectorLayout ];
}
/// ----------------------------------------------------------------------