Package io.deephaven.extensions.barrage
Class ColumnEncoding
java.lang.Object
io.deephaven.extensions.barrage.ColumnEncoding
Arrow encoding to apply to a column when generating a Barrage schema. Auto-detected per column by
BarrageUtil.schemaFromTable(io.deephaven.engine.table.Table) when structural guarantees make a particular
encoding clearly beneficial, or specified explicitly via
Table.BARRAGE_SCHEMA_ATTRIBUTE.
An encoding carries two independent facets: an optional run-end encoding (REE) run_ends index width, and an optional
dictionary-index width. When both are present the column is doubly-encoded as RunEndEncoded<Dictionary<...>>
-- REE collapses runs on the row axis and the dictionary dedupes the per-run values. The historical single-facet
constants (RUN_END_ENCODED_INT32, DICTIONARY_ENCODED_INT32, ...) remain available as canonical
singletons; compose them with withDictionary(io.deephaven.extensions.barrage.ColumnEncoding.DictWidth) / withRunEnd(io.deephaven.extensions.barrage.ColumnEncoding.RunEndWidth).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumWidth of the dictionary index (the values shipped in the RecordBatch).static enumWidth of the REErun_endsindex child. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ColumnEncodingstatic final ColumnEncodingstatic final ColumnEncodingstatic final ColumnEncodingstatic final ColumnEncodingstatic final ColumnEncodingstatic final ColumnEncoding -
Method Summary
Modifier and TypeMethodDescriptionThe dictionary index width, ornullif not dictionary encoded.booleaninthashCode()booleanReturnstrueif this encoding includes dictionary encoding.booleanReturnstrueif this encoding includes run-end encoding.static ColumnEncodingof(ColumnEncoding.RunEndWidth runEndWidth, ColumnEncoding.DictWidth dictWidth) Returns an encoding with the given (possiblynull) facets.The REE run_ends width, ornullif not run-end encoded.toString()Returns a copy of this encoding with dictionary encoding added (or its width replaced).Returns a copy of this encoding with run-end encoding added (or its width replaced).
-
Field Details
-
RUN_END_ENCODED_INT16
-
RUN_END_ENCODED_INT32
-
RUN_END_ENCODED_INT64
-
DICTIONARY_ENCODED_INT8
-
DICTIONARY_ENCODED_INT16
-
DICTIONARY_ENCODED_INT32
-
DICTIONARY_ENCODED_INT64
-
-
Method Details
-
of
public static ColumnEncoding of(ColumnEncoding.RunEndWidth runEndWidth, ColumnEncoding.DictWidth dictWidth) Returns an encoding with the given (possiblynull) facets. Prefer the named singletons andwithDictionary(io.deephaven.extensions.barrage.ColumnEncoding.DictWidth)/withRunEnd(io.deephaven.extensions.barrage.ColumnEncoding.RunEndWidth)for readability. -
withDictionary
Returns a copy of this encoding with dictionary encoding added (or its width replaced). -
withRunEnd
Returns a copy of this encoding with run-end encoding added (or its width replaced). -
isRunEndEncoded
public boolean isRunEndEncoded()Returnstrueif this encoding includes run-end encoding. -
isDictionaryEncoded
public boolean isDictionaryEncoded()Returnstrueif this encoding includes dictionary encoding. -
runEndWidth
The REE run_ends width, ornullif not run-end encoded. -
dictWidth
The dictionary index width, ornullif not dictionary encoded. -
equals
-
hashCode
public int hashCode() -
toString
-