Skip to content

16.6.6 ROLLUP Support

Edition and Table Scope

FeatureStandardCluster
Create, query, and control ordinary, conditional, and extended ROLLUPs on time-axis TAG tablesOO
Automatic creation with WITH ROLLUPOO
Supported JSON path and whole-document aggregationOO
Custom INTO…ASOX
ROLLUP_REBUILDSupported for limited targets and argumentsX

Time-axis ROLLUP does not apply to distance-axis TAG, LOG, TRANSACTION, VOLATILE, or LOOKUP tables. In Cluster Edition, check status by relevant node and hierarchy level.

Creation Types and Columns

TypeRequirements
Ordinary numericSupported numeric DATA column; SUMMARIZED is not required for explicit creation
JSON pathJSON DATA column and a numeric path to aggregate
Whole JSON documentJSON SUMMARIZED column
WITH ROLLUPThird SUMMARIZED column of a time-axis TAG table
FROM hierarchyA larger integer-multiple interval with matching extension and mode conditions
CustomOne source time-axis TAG table and a precreated compatible target TAG table

Aggregation and Selection

Ordinary numeric ROLLUP provides MIN/MAX/SUM/COUNT/AVG/SUMSQ; extended ROLLUP also provides FIRST/LAST. Users must reaggregate partial Custom results. Combine averages using sums and valid counts, and preserve corresponding timestamps when combining FIRST/LAST. Whole-document JSON COUNT is the stored aggregate count and need not equal the original COUNT(value).

Candidate selection depends on predicates, columns, paths, mode, and interval. Do not infer priority from ordinary/extended status alone or assume a 24 HOUR ROLLUP automatically applies to daily buckets. Check the query rules.

REBUILD Scope Differs from Creation Scope

REBUILD targets complete automatic SEC/MIN/HOUR hierarchies and supported Custom paths. It cannot rebuild every configuration that can be created, such as arbitrary manual names, partial automatic hierarchies, or 10 MIN Custom rollups. Custom time-boundary processing currently supports 1 SEC, 1 MIN, and 1 HOUR and must match SELECT buckets. For constant time arguments, expansion to whole buckets, state transitions, and checks after errors, follow the REBUILD Reference.

Privileges

Grant the operational account database access and required creation, deletion, and query privileges. The following example grants create/drop privileges to an existing account; it does not configure every required privilege in one script.

GRANT CREATE, DROP ON DATABASE MACHBASEDB TO rollup_user;

Check ownership and operation scope in Privilege Management.

Last updated on