Skip to content

Commit

Permalink
ARROW-8407: [Rust] Add documentation for Dictionary data type
Browse files Browse the repository at this point in the history
Add documentation for Dictionary data type

Closes #6904 from andygrove/rustdoc-dictionary-type

Authored-by: Andy Grove <andygrove73@gmail.com>
Signed-off-by: Krisztián Szűcs <szucs.krisztian@gmail.com>
  • Loading branch information
andygrove authored and kszucs committed Apr 13, 2020
1 parent a33c294 commit cabfb8f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rust/arrow/src/array/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1782,7 +1782,7 @@ impl From<(Vec<(Field, ArrayRef)>, Buffer, usize)> for StructArray {
}
}

/// A dictonary array where each element is a single value indexed by an integer key.
/// A dictionary array where each element is a single value indexed by an integer key.
/// This is mostly used to represent strings or a limited set of primitive types as integers,
/// for example when doing NLP analysis or representing chromosomes by name.
///
Expand Down
2 changes: 2 additions & 0 deletions rust/arrow/src/datatypes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ pub enum DataType {
FixedSizeList(Box<DataType>, i32),
/// A nested datatype that contains a number of sub-fields.
Struct(Vec<Field>),
/// A dictionary array where each element is a single value indexed by an integer key.
/// This is mostly used to represent strings or a limited set of primitive types as integers.
Dictionary(Box<DataType>, Box<DataType>),
}

Expand Down

0 comments on commit cabfb8f

Please sign in to comment.