

要获得与亚马逊 Timestream 类似的功能 LiveAnalytics，可以考虑适用于 InfluxDB 的亚马逊 Timestream。适用于 InfluxDB 的 Amazon Timestream 提供简化的数据摄取和个位数毫秒级的查询响应时间，以实现实时分析。点击[此处](https://docs.aws.amazon.com//timestream/latest/developerguide/timestream-for-influxdb.html)了解更多信息。

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 按位函数
<a name="bitwise-functions"></a>

的 Timestream LiveAnalytics 支持以下按位函数。


| 函数 | 输出数据类型 | 说明 | 
| --- | --- | --- | 
| bit\_count(bigint, bigint) | bigint（二进制补码） | 返回第一个 bigint 参数中位数的计数，其中第二个参数是有符号的位整数，例如 8 或 64。<pre>SELECT bit_count(19, 8)</pre><br />示例结果：`3`<pre>SELECT bit_count(19, 2)</pre><br />示例结果：`Number must be representable with the bits specified. 19 can not be represented with 2 bits` | 
| bitwise\_and(bigint, bigint) | bigint（二进制补码） | 返回 bigint 参数的按位与结果。<pre>SELECT bitwise_and(12, 7)</pre><br />示例结果：`4` | 
| bitwise\_not(bigint) | bigint（二进制补码） | 返回 bigint 参数的按位非结果。<pre>SELECT bitwise_not(12)</pre><br />示例结果：`-13` | 
| bitwise\_or(bigint, bigint) | bigint（二进制补码） | 返回 bigint 参数的按位或结果。<pre>SELECT bitwise_or(12, 7)</pre><br />示例结果：`15` | 
| bitwise\_xor(bigint, bigint) | bigint（二进制补码） | 返回 bigint 参数的按位异或结果。<pre>SELECT bitwise_xor(12, 7)</pre><br />示例结果：`11` | 