Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions r/R/dictionary.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,38 @@

#' @include type.R

#' @title class DictionaryType
#' @title DictionaryType class
#'
#' @description
#' `DictionaryType` is a [FixedWidthType] that represents dictionary-encoded data.
#' Dictionary encoding stores unique values in a dictionary and uses integer-type
#' indices to reference them, which can be more memory-efficient for data with many
#' repeated values.
#'
#' @usage NULL
#' @format NULL
#' @docType class
#'
#' @section Methods:
#' @section R6 Methods:
#'
#' - `$ToString()`: Return a string representation of the dictionary type
#' - `$code(namespace = FALSE)`: Return R code to create this dictionary type
#'
#' @section Active bindings:
#'
#' - `$index_type`: The [DataType] for the dictionary indices (must be an integer type,
#' signed or unsigned)
#' - `$value_type`: The [DataType] for the dictionary values
#' - `$name`: The name of the type.
#' - `$ordered`: Whether the dictionary is ordered.
#'
#' @section Factory:
#'
#' `DictionaryType$create()` takes the following arguments:
#'
#' TODO
#' - `index_type`: A [DataType] for the indices (default [int32()])
#' - `value_type`: A [DataType] for the values (default [utf8()])
#' - `ordered`: Is this an ordered dictionary (default `FALSE`)?
#'
#' @rdname DictionaryType
#' @name DictionaryType
Expand Down
Loading