This commit is contained in:
lihui 2020-02-14 10:52:57 +08:00
parent 84cfc8f65d
commit 5fd697bfe9
1 changed files with 2 additions and 2 deletions

View File

@ -1655,7 +1655,7 @@ int32_t addExprAndResultField(SQueryInfo* pQueryInfo, int32_t colIdx, tSQLExprIt
SSchema* pSchema = tsGetSchema(pMeterMetaInfo->pMeterMeta);
// functions can not be applied to tags
if (index.columnIndex >= pMeterMetaInfo->pMeterMeta->numOfColumns) {
if ((index.columnIndex >= pMeterMetaInfo->pMeterMeta->numOfColumns) || (index.columnIndex < 0)) {
return invalidSqlErrMsg(pQueryInfo->msg, msg6);
}