From 448dbb0bd0494b85708ee82a061767019115629b Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Sat, 8 Aug 2020 20:08:02 +0000 Subject: [PATCH] [TD-1041] bugfix --- src/client/src/tscSQLParser.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index bcf43a1a8b..817fe3d3f7 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -1902,6 +1902,8 @@ int32_t addExprAndResultField(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_t col if (changeFunctionID(optr, &functionId) != TSDB_CODE_SUCCESS) { return TSDB_CODE_TSC_INVALID_SQL; } + tscInsertPrimaryTSSourceColumn(pQueryInfo, &index); + colIndex += 1; // the first column is ts pExpr = tscSqlExprAppend(pQueryInfo, functionId, &index, resultType, resultSize, resultSize, false); addExprParams(pExpr, val, TSDB_DATA_TYPE_DOUBLE, sizeof(double), 0); -- GitLab