[td-168] fix group by tbname error

This commit is contained in:
hjxilinx 2020-05-03 02:04:00 +08:00
parent e7338b02fb
commit 1f0d27b664
1 changed files with 5 additions and 4 deletions

View File

@ -1320,16 +1320,17 @@ int32_t tableGroupComparFn(const void *p1, const void *p2, const void *param) {
SColIndex* pColIndex = &pTableGroupSupp->pCols[i]; SColIndex* pColIndex = &pTableGroupSupp->pCols[i];
int32_t colIndex = pColIndex->colIndex; int32_t colIndex = pColIndex->colIndex;
assert(colIndex >= 0 && colIndex < schemaNCols(pTableGroupSupp->pTagSchema)); assert((colIndex >= 0 && colIndex < schemaNCols(pTableGroupSupp->pTagSchema)) ||
(colIndex == TSDB_TBNAME_COLUMN_INDEX));
char * f1 = NULL; char * f1 = NULL;
char * f2 = NULL; char * f2 = NULL;
int32_t type = 0; int32_t type = 0;
int32_t bytes = 0; int32_t bytes = 0;
if (colIndex == -1) { // todo fix me, table name if (colIndex == TSDB_TBNAME_COLUMN_INDEX) {
// f1 = s1->tags; f1 = pTable1->name;
// f2 = s2->tags; f2 = pTable2->name;
type = TSDB_DATA_TYPE_BINARY; type = TSDB_DATA_TYPE_BINARY;
bytes = TSDB_TABLE_NAME_LEN; bytes = TSDB_TABLE_NAME_LEN;
} else { } else {