[td-225]fix bug found by regression test.

This commit is contained in:
Haojun Liao 2021-04-27 10:52:19 +08:00
parent 472ed4e8eb
commit b45f8b24f0
1 changed files with 5 additions and 5 deletions

View File

@ -6047,7 +6047,11 @@ static int32_t doAddGroupbyColumnsOnDemand(SSqlCmd* pCmd, SQueryInfo* pQueryInfo
STableMetaInfo* pTableMetaInfo = tscGetMetaInfo(pQueryInfo, 0);
SSchema* pSchema = tscGetTableSchema(pTableMetaInfo->pTableMeta);
SSchema* tagSchema = tscGetTableTagSchema(pTableMetaInfo->pTableMeta);
SSchema* tagSchema = NULL;
if (!UTIL_TABLE_IS_NORMAL_TABLE(pTableMetaInfo)) {
tagSchema = tscGetTableTagSchema(pTableMetaInfo->pTableMeta);
}
SSchema* s = NULL;
@ -6196,10 +6200,6 @@ int32_t doFunctionsCompatibleCheck(SSqlCmd* pCmd, SQueryInfo* pQueryInfo) {
return TSDB_CODE_TSC_INVALID_SQL;
}
/*
* group by tag function must be not changed the function name, otherwise, the group operation may fail to
* divide the subset of final result.
*/
if (doAddGroupbyColumnsOnDemand(pCmd, pQueryInfo) != TSDB_CODE_SUCCESS) {
return TSDB_CODE_TSC_INVALID_SQL;
}