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

使用每个汇总组的二进制 AND 操作累计值(如果没有分组就完成了汇总,则返回总计值)。Accumulates values using the binary AND 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_and(Expr)summarize binary_all_and(Expr)

参数Arguments

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

返回Returns

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

示例Example

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

datatable(num:long)
[
  0xFFFFFFFF, 
  0xFFFFF00F,
  0xCFFFFFFD,
  0xFAFEFFFF,
]
| summarize result = toupper(tohex(binary_all_and(num)))
resultresult
CAFEF00DCAFEF00D