binary_all_or()(聚合函数)binary_all_or() (aggregation function)

使用每个汇总组的二进制 OR 操作累计值(如果没有分组就完成了汇总,则返回总计值)。Accumulates values using the binary OR operation per summarization group (or in total, if summarization is done without grouping).

  • 只能在 summarize 内的聚合上下文中使用Can be used only in context of aggregation inside summarize

语法Syntax

summarize binary_all_or(Expr)summarize binary_all_or(Expr)

参数Arguments

  • Expr :长整型数字。Expr : long number.

返回Returns

返回使用二进制 OR 操作对每个汇总组的记录进行聚合所得的值(如果没有分组就完成了汇总,则返回总计值)。Returns a value that is aggregated using the binary OR operation over records per summarization group (or in total, if summarization is done without grouping).

示例Example

使用二进制 OR 操作生成“cafe-food”:Producing 'cafe-food' using binary OR operations:

datatable(num:long)
[
  0x88888008,
  0x42000000,
  0x00767000,
  0x00000005, 
]
| summarize result = toupper(tohex(binary_all_or(num)))
resultresult
CAFEF00DCAFEF00D