16.6.6 ROLLUP Support
Edition and Table Scope
| Feature | Standard | Cluster |
|---|---|---|
| Create, query, and control ordinary, conditional, and extended ROLLUPs on time-axis TAG tables | O | O |
| Automatic creation with WITH ROLLUP | O | O |
| Supported JSON path and whole-document aggregation | O | O |
| Custom INTO…AS | O | X |
| ROLLUP_REBUILD | Supported for limited targets and arguments | X |
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
| Type | Requirements |
|---|---|
| Ordinary numeric | Supported numeric DATA column; SUMMARIZED is not required for explicit creation |
| JSON path | JSON DATA column and a numeric path to aggregate |
| Whole JSON document | JSON SUMMARIZED column |
| WITH ROLLUP | Third SUMMARIZED column of a time-axis TAG table |
| FROM hierarchy | A larger integer-multiple interval with matching extension and mode conditions |
| Custom | One 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 original timestamps and secondary sort keys 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.
Composite FIRST/LAST support
Composite FIRST/LAST sort keys and ordered EXTENSION ROLLUPs are supported from Machbase 8.7.3. Edition-specific restrictions are described below.
Composite source queries and numeric ordered EXTENSION ROLLUPs are supported in Standard
and Cluster from 8.7.3. Custom ROLLUP creation and its worker are Standard-only; Cluster
returns ERR-02837. An ordinary SELECT that reaggregates summary rows already stored in a
TAG using composite FIRST/LAST is supported in Cluster as a distributed TAG query.
The first key of an ordered ROLLUP definition must be BASETIME; this does not restrict the
stored source timestamps used in ordinary TAG reaggregation.
Public ROWID secondary keys are Standard-only and explicit. They preserve the original row’s identifier, not insertion order; existing ROWID restrictions remain. Cluster does not support them. DECIMAL sort keys are supported. Query keys and directions must match the stored definition. Deploy the same supporting build on all Cluster nodes; mixed binaries are unsupported.
Opening or MOUNTing an ordered-ROLLUP DB with an older binary lacking this feature is unsupported, even if metadata version checks pass. Restore a pre-feature backup to roll back; dropping ordered objects alone does not guarantee compatibility. See migration and rollback restrictions.