Method
OmniAggregationDetailBuilderappend_column_with_sql
Declaration
OmniAggregationColumnBuilder*
omni_aggregation_detail_builder_append_column_with_sql (
OmniAggregationDetailBuilder* self,
const gchar* expr
)
Description
Append a new column with a custom SQL expression.
The SQL expression can refer to grouping fields directly, or to other
fields inside aggregate functions. For example, a SQL expression
SUM("table[0]"."x") displays the sum of the first source stream’s field named x for each group.
The table name can be omitted if there is exactly one source stream.
Current Limitation: The SQL expression can only refer to the first
Current Limitation: The table name can be omitted even if there are multiple source streams. This behavior is a bug and must not be relied upon.
Each aggregation function invocation must reference fields from
exactly one source stream.
The asterisk syntax (e.g., COUNT(*)) is not allowed.
Window functions are not supported.
The following placeholders can be used in the SQL expression:
-
$time_start[0]/$time_end[0]: Replaced with the time filtering range. This range is bounded by the stream time range (fSTR). The stream index must be an integer literal. -
$time_start/$time_end: Shorthand for$time_start[0]/$time_end[0]available if there is exactly one input stream.
Note: Using placeholders can degrade performance.
Parameters
expr-
Type:
const gchar*No description available.
The data is owned by the caller of the method. The value is a NUL terminated UTF-8 string.
Return value
Type: OmniAggregationColumnBuilder
No description available.
| The caller of the method takes ownership of the returned data, and is responsible for freeing it. |