Package io.deephaven.stream
Class StreamChunkUtils
java.lang.Object
io.deephaven.stream.StreamChunkUtils
Common utilities to support stream ingestion to
chunks, which is an important building block.
Includes support for determining ingestion chunk types and allocating ingestion chunks. These
utilities establish "standard" data type to chunk type mappings.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull ChunkTypechunkTypeForColumnIndex(@NotNull TableDefinition tableDefinition, int columnIndex) Return theChunkTypefor a given column index in the specifiedTableDefinition.static <ATTR extends Any>
@NotNull WritableChunk<ATTR>[]makeChunksForDefinition(@NotNull TableDefinition definition, int size) Make output chunks for the specifiedTableDefinition.static Class<?>replacementType(@NotNull Class<?> columnDataType)
-
Constructor Details
-
StreamChunkUtils
public StreamChunkUtils()
-
-
Method Details
-
chunkTypeForColumnIndex
@NotNull public static @NotNull ChunkType chunkTypeForColumnIndex(@NotNull @NotNull TableDefinition tableDefinition, int columnIndex) Return theChunkTypefor a given column index in the specifiedTableDefinition.- Parameters:
tableDefinition- theTableDefinitioncolumnIndex- the column index to get theChunkTypefor- Returns:
- the
ChunkTypefor the specified column
-
makeChunksForDefinition
@NotNull public static <ATTR extends Any> @NotNull WritableChunk<ATTR>[] makeChunksForDefinition(@NotNull @NotNull TableDefinition definition, int size) Make output chunks for the specifiedTableDefinition.- Parameters:
definition- theTableDefinitionto make chunks forsize- the size of the returned chunks- Returns:
- an array of writable chunks
-
replacementType
For storage, we substitutelongandbyteforInstantandBoolean, respectively. We expect ingesters to pass us primitive chunks for those types.- Parameters:
columnDataType- the "external" column data type- Returns:
- the "internal" data type to be supplied
-