Package io.deephaven.pivot
Interface PivotTable.PivotSnapshot
- All Superinterfaces:
AutoCloseable
,SafeCloseable
- Enclosing interface:
- PivotTable
A pivot snapshot contains three logical tables (represented as parallel definitions and chunks) that can be
assembled into a view on the screen:
- Rows: The rows "table" contain the values of the row keys, their depth, and expanded state. The total column for each row is present in the rows table, with one chunk per output value.
- Columns: The columns "table" contain the values of the column keys, their depth, and expanded state. Similarly, the total for each column is present in the columns table, with one chunk per output value.
- Grand totals: There is one value column for each of the requested output values. Each value chunk has one element, for the grand total for that value.
- Values: There is one value column for each of the requested output values. Each value chunk has r * c elements. The first column is located in positions 0..r-1, the next column in r..2r-1, until the final column located in positions (c-1)*r..r*c-1.
The returned snapshot has allocated Chunks for the result. After completing processing, the caller must call
SafeCloseable.close()
on the snapshot to release these chunks.
-
Method Summary
Modifier and TypeMethodDescription@NotNull ColumnDefinition<?>[]
Get the definition for the column chunks in this snapshot.@NotNull WritableChunk<Values>[]
long
long
@NotNull WritableChunk<Values>[]
@NotNull ColumnDefinition<?>[]
Get the definition for the row chunks in this snapshot.@NotNull WritableChunk<Values>[]
@NotNull ColumnDefinition<?>[]
Get the definition for the value chunks in this snapshot.@NotNull WritableChunk<Values>[]
Methods inherited from interface io.deephaven.util.SafeCloseable
close
-
Method Details
-
expandedRowSize
long expandedRowSize()- Returns:
- the total expanded data size (in rows) or an estimate thereof
-
expandedColumnSize
long expandedColumnSize()- Returns:
- the total expanded data size (in columns) or an estimate thereof
-
rowsDefinition
Get the definition for the row chunks in this snapshot. This may differ from thePivotTable's row definition
, because the snapshot may not include all possible output columns.- Returns:
- the definition of the rowsSnapshot chunks
-
columnsDefinition
Get the definition for the column chunks in this snapshot. This may differ from thePivotTable's column definition
, because the snapshot may not include all possible output columns.- Returns:
- the definition of the rowsSnapshot chunks
-
valuesDefinition
Get the definition for the value chunks in this snapshot. This may differ from thePivotTable's value definition
, because the snapshot may not include all possible output columns.- Returns:
- the definition of the valuesSnapshot and grandTotalsSnapshot chunks
-
rowsSnapshot
- Returns:
- the chunks containing the row snapshot
-
columnsSnapshot
- Returns:
- the chunks containing the columns snapshot
-
grandTotalsSnapshot
- Returns:
- the grand total values; using
valuesDefinition()
-
valuesSnapshot
- Returns:
- the chunks for the grid of values, stored in column major order
-