Merge remote-tracking branch 'origin/develop' into feature/crash_gen
This commit is contained in:
commit
76dc969f4d
|
@ -54,6 +54,7 @@ matrix:
|
|||
|
||||
py3ver=`python3 --version|awk '{print $2}'|cut -d "." -f 1,2` && apt install python$py3ver-dev
|
||||
pip3 install psutil
|
||||
pip3 install guppy3
|
||||
pip3 install --user ${TRAVIS_BUILD_DIR}/src/connector/python/linux/python3/
|
||||
|
||||
cd ${TRAVIS_BUILD_DIR}/tests
|
||||
|
|
|
@ -29,7 +29,7 @@ Query OK, 2 row(s) in set (0.001100s)
|
|||
具体的查询语法请看<a href="https://www.taosdata.com/cn/documentation20/taos-sql/">TAOS SQL </a>。
|
||||
|
||||
## 多表聚合查询
|
||||
物联网场景中,往往同一个类型的数据采集点有多个。TDengine采用超级表(STable)的概念来描述某一个类型的数据采集点,一张普通的表来描述一个具体的数据采集点。同时TDengine使用标签来描述数据采集点的静态属性,一个具体的数据采集点有具体的标签值。通过指定标签的过滤条件,TDengine提供了一高效的方法将超级表(某一类型的数据采集点)所属的子表进行聚合查询。对普通表的聚合函数以及绝大部分操作都适用于超级表,语法完全一样。
|
||||
物联网场景中,往往同一个类型的数据采集点有多个。TDengine采用超级表(STable)的概念来描述某一个类型的数据采集点,一张普通的表来描述一个具体的数据采集点。同时TDengine使用标签来描述数据采集点的静态属性,一个具体的数据采集点有具体的标签值。通过指定标签的过滤条件,TDengine提供了一高效的方法将超级表(某一类型的数据采集点)所属的子表进行聚合查询。对普通表的聚合函数以及绝大部分操作都适用于超级表,语法完全一样。
|
||||
|
||||
**示例1**:在TAOS Shell,查找北京所有智能电表采集的电压平均值,并按照location分组
|
||||
```mysql
|
||||
|
|
|
@ -224,7 +224,7 @@ static int32_t mnodeRetrieveClusters(SShowObj *pShow, char *data, int32_t rows,
|
|||
mnodeDecClusterRef(pCluster);
|
||||
numOfRows++;
|
||||
}
|
||||
|
||||
mnodeVacuumResult(data, cols, numOfRows, rows, pShow);
|
||||
pShow->numOfReads += numOfRows;
|
||||
return numOfRows;
|
||||
}
|
||||
|
|
|
@ -857,6 +857,7 @@ int32_t mnodeRetrieveModules(SShowObj *pShow, char *data, int32_t rows, void *pC
|
|||
|
||||
char* pWrite;
|
||||
char* moduleName[5] = { "MNODE", "HTTP", "MONITOR", "MQTT", "UNKNOWN" };
|
||||
int32_t cols;
|
||||
|
||||
while (numOfRows < rows) {
|
||||
SDnodeObj *pDnode = NULL;
|
||||
|
@ -864,7 +865,7 @@ int32_t mnodeRetrieveModules(SShowObj *pShow, char *data, int32_t rows, void *pC
|
|||
if (pDnode == NULL) break;
|
||||
|
||||
for (int32_t moduleType = 0; moduleType < TSDB_MOD_MAX; ++moduleType) {
|
||||
int32_t cols = 0;
|
||||
cols = 0;
|
||||
|
||||
pWrite = data + pShow->offset[cols] * rows + pShow->bytes[cols] * numOfRows;
|
||||
*(int16_t *)pWrite = pDnode->dnodeId;
|
||||
|
@ -890,6 +891,7 @@ int32_t mnodeRetrieveModules(SShowObj *pShow, char *data, int32_t rows, void *pC
|
|||
|
||||
mnodeDecDnodeRef(pDnode);
|
||||
}
|
||||
mnodeVacuumResult(data, cols, numOfRows, rows, pShow);
|
||||
|
||||
pShow->numOfReads += numOfRows;
|
||||
return numOfRows;
|
||||
|
@ -1081,6 +1083,7 @@ static int32_t mnodeRetrieveVnodes(SShowObj *pShow, char *data, int32_t rows, vo
|
|||
} else {
|
||||
numOfRows = 0;
|
||||
}
|
||||
mnodeVacuumResult(data, cols, numOfRows, rows, pShow);
|
||||
|
||||
pShow->numOfReads += numOfRows;
|
||||
return numOfRows;
|
||||
|
|
|
@ -413,6 +413,7 @@ static int32_t mnodeRetrieveMnodes(SShowObj *pShow, char *data, int32_t rows, vo
|
|||
|
||||
mnodeDecMnodeRef(pMnode);
|
||||
}
|
||||
mnodeVacuumResult(data, cols, numOfRows, rows, pShow);
|
||||
|
||||
pShow->numOfReads += numOfRows;
|
||||
|
||||
|
|
|
@ -385,6 +385,7 @@ static int32_t mnodeRetrieveUsers(SShowObj *pShow, char *data, int32_t rows, voi
|
|||
numOfRows++;
|
||||
mnodeDecUserRef(pUser);
|
||||
}
|
||||
mnodeVacuumResult(data, cols, numOfRows, rows, pShow);
|
||||
|
||||
pShow->numOfReads += numOfRows;
|
||||
return numOfRows;
|
||||
|
|
|
@ -771,6 +771,7 @@ static int32_t mnodeRetrieveVgroups(SShowObj *pShow, char *data, int32_t rows, v
|
|||
mnodeDecVgroupRef(pVgroup);
|
||||
numOfRows++;
|
||||
}
|
||||
mnodeVacuumResult(data, cols, numOfRows, rows, pShow);
|
||||
|
||||
pShow->numOfReads += numOfRows;
|
||||
mnodeDecTableRef(pTable);
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
<dependency>
|
||||
<groupId>com.taosdata.jdbc</groupId>
|
||||
<artifactId>taos-jdbcdriver</artifactId>
|
||||
<version>2.0.7</version>
|
||||
<version>2.0.8</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
|
Loading…
Reference in New Issue