Package com.twilio.kudu.sql.mutation
Class CubeMaintainer
java.lang.Object
com.twilio.kudu.sql.mutation.CubeMaintainer
Used to calculate aggregated values and upsert rows to the kudu cube tables
-
Constructor Summary
ConstructorDescriptionCubeMaintainer
(CalciteKuduTable cubeCalciteKuduTable, CalciteKuduTable factCalciteKuduTable) -
Method Summary
Modifier and TypeMethodDescriptiongenerateCubeDelta
(Map<Integer, Object> colIndexToValueMap) Remaps the fact table columns to the cube table pk columns (dimensions) and the cube table non pk columns (measures) Also truncates the event time column to the cube rollup timelong
TODO support month and year
-
Constructor Details
-
CubeMaintainer
-
-
Method Details
-
getFloorMod
public long getFloorMod()TODO support month and year- Returns:
- the mod value used to truncate the timestamp
-
generateCubeDelta
public org.apache.kudu.util.Pair<Object[],Object[]> generateCubeDelta(Map<Integer, Object> colIndexToValueMap) Remaps the fact table columns to the cube table pk columns (dimensions) and the cube table non pk columns (measures) Also truncates the event time column to the cube rollup time- Parameters:
colIndexToValueMap
- map from fact table column index to column value- Returns:
- pair of array of pk column values and array of non-pk column values
-
getNonPKColumnIndexes
-
gePKColumnIndexes
-