diff --git a/src/client/src/tscStream.c b/src/client/src/tscStream.c index 02d8b7957ee84aaae3ed689c94b84feab9421904..317e10b2b344e8f851373250a808152e0c1d48e7 100644 --- a/src/client/src/tscStream.c +++ b/src/client/src/tscStream.c @@ -101,11 +101,19 @@ static void doLaunchQuery(void* param, TAOS_RES* tres, int32_t code) { return; } + if (UTIL_TABLE_IS_SUPER_TABLE(pTableMetaInfo) && (pTableMetaInfo->pVgroupTables == NULL) && (pTableMetaInfo->vgroupList == NULL || pTableMetaInfo->vgroupList->numOfVgroups <= 0)) { + tscDebug("%p empty vgroup list", pSql); + pTableMetaInfo->vgroupList = tscVgroupInfoClear(pTableMetaInfo->vgroupList); + code = TSDB_CODE_TSC_APP_ERROR; + } + // failed to get table Meta or vgroup list, retry in 10sec. if (code == TSDB_CODE_SUCCESS) { tscTansformFuncForSTableQuery(pQueryInfo); tscDebug("0x%"PRIx64" stream:%p, start stream query on:%s", pSql->self, pStream, tNameGetTableName(&pTableMetaInfo->name)); + pQueryInfo->command = TSDB_SQL_SELECT; + pSql->fp = tscProcessStreamQueryCallback; pSql->fetchFp = tscProcessStreamQueryCallback; tscDoQuery(pSql);