diff --git a/docs/en/20-third-party/09-emq-broker.md b/docs/en/20-third-party/09-emq-broker.md index 8dfa09e6c7d1615ea3a1145428efe920588b687e..6e44d11b5f21b055d793294ddb48eb52ffb24470 100644 --- a/docs/en/20-third-party/09-emq-broker.md +++ b/docs/en/20-third-party/09-emq-broker.md @@ -16,6 +16,7 @@ The following preparations are required for EMQX to add TDengine data sources co Depending on the current operating system, users can download the installation package from the [EMQX official website](https://www.emqx.io/downloads) and execute the installation. After installation, use `sudo emqx start` or `sudo systemctl start emqx` to start the EMQX service. +Note: this chapter is based on EMQX v4.4.5. Other version of EMQX probably change its user interface, configuration methods or functions. ## Create Database and Table diff --git a/docs/zh/20-third-party/09-emq-broker.md b/docs/zh/20-third-party/09-emq-broker.md index 84b1027f6b080cc5d5f8ac98f9aa6ea8be428f28..07066ba94d741645732e5a35ad6f018b9671c1ab 100644 --- a/docs/zh/20-third-party/09-emq-broker.md +++ b/docs/zh/20-third-party/09-emq-broker.md @@ -17,6 +17,7 @@ MQTT 是流行的物联网数据传输协议,[EMQX](https://github.com/emqx/em 用户可以根据当前的操作系统,到 EMQX 官网下载安装包,并执行安装。下载地址如下:。安装后使用 `sudo emqx start` 或 `sudo systemctl start emqx` 启动 EMQX 服务。 +注意:本文基于 EMQX v4.4.5 版本,其他版本由于相关配置界面、配置方法以及功能可能随着版本升级有所区别。 ## 创建数据库和表 diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index d12cf8d03fa20d6a518e9fcae263a4f6052f8177..28d3d6072782b06299190c4d2174f173b0269f51 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -2814,6 +2814,7 @@ static bool notContainSessionOrStateWindow(SQueryAttr *pQueryAttr) { return !(pQ static int32_t updateBlockLoadStatus(SQueryAttr *pQuery, int32_t status) { bool hasFirstLastFunc = false; bool hasOtherFunc = false; + bool hasCount = false; if (status == BLK_DATA_ALL_NEEDED || status == BLK_DATA_DISCARD) { return status; @@ -2829,6 +2830,8 @@ static int32_t updateBlockLoadStatus(SQueryAttr *pQuery, int32_t status) { if (functionId == TSDB_FUNC_FIRST_DST || functionId == TSDB_FUNC_LAST_DST) { hasFirstLastFunc = true; + } else if(functionId == TSDB_FUNC_COUNT) { + hasCount = true; } else { hasOtherFunc = true; } @@ -2836,7 +2839,7 @@ static int32_t updateBlockLoadStatus(SQueryAttr *pQuery, int32_t status) { if (hasFirstLastFunc && status == BLK_DATA_NO_NEEDED) { if(!hasOtherFunc) { - return BLK_DATA_DISCARD; + return hasCount ? BLK_DATA_NO_NEEDED : BLK_DATA_DISCARD; } else { return BLK_DATA_ALL_NEEDED; }