mirror of https://github.com/apache/druid.git
parent
bf5d829b71
commit
bef6f43e3d
|
@ -50,7 +50,9 @@ Expressions can contain variables. Variable names may contain letters, digits, '
|
|||
|
||||
For logical operators, a number is true if and only if it is positive (0 or negative value means false). For string type, it's the evaluation result of 'Boolean.valueOf(string)'.
|
||||
|
||||
[Multi-value string dimensions](../querying/multi-value-dimensions.md) are supported and may be treated as either scalar or array typed values. When treated as a scalar type, an expression will automatically be transformed to apply the scalar operation across all values of the multi-valued type, to mimic Druid's native behavior. Values that result in arrays will be coerced back into the native Druid string type for aggregation. Druid aggregations on multi-value string dimensions on the individual values, _not_ the 'array', behaving similar to the `UNNEST` operator available in many SQL dialects. However, by using the `array_to_string` function, aggregations may be done on a stringified version of the complete array, allowing the complete row to be preserved. Using `string_to_array` in an expression post-aggregator, allows transforming the stringified dimension back into the true native array type.
|
||||
[Multi-value string dimensions](../querying/multi-value-dimensions.md) are supported and may be treated as either scalar or array typed values, as follows:
|
||||
* When treated as a scalar type, the expression is automatically transformed so that the scalar operation is applied across all values of the multi-valued type, mimicking Druid's native behavior.
|
||||
* Values that result in arrays are coerced back into the native Druid string type for grouping and aggregation. Grouping on multi-value string dimensions in Druid will group by the individual values, not the 'array', resulting in behavior similar to the UNNEST operator available in many SQL dialects. Alternatively, you can use the `array_to_string` function to perform the aggregation on a _stringified_ version of the complete array, preserving the complete row. Using `string_to_array` in an expression post-aggregator transforms the stringified dimension back into the true native array type.
|
||||
|
||||
|
||||
The following built-in functions are available.
|
||||
|
|
Loading…
Reference in New Issue