From ec4c26f77487ee5efeb3c84de9831df33b37e339 Mon Sep 17 00:00:00 2001 From: slguan Date: Tue, 17 Sep 2019 13:48:18 +0800 Subject: [PATCH] fix issue #516 --- src/client/src/tscSQLParser.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index 5c9ba52d5a..da0a2047f5 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -3197,8 +3197,14 @@ int32_t buildQueryCond(SSqlObj* pSql, tSQLExpr* pExpr) { } int32_t getTimeRange(int64_t* stime, int64_t* etime, tSQLExpr* pRight, int32_t optr, int16_t timePrecision) { - assert(pRight->nSQLOptr == TK_INTEGER || pRight->nSQLOptr == TK_FLOAT || pRight->nSQLOptr == TK_STRING || - pRight->nSQLOptr == TK_TIMESTAMP); + /* + * filter primary ts filter expression like: + * "where ts in ('2015-12-12 4:8:12')" + * is not supported. + */ + if (pRight->nSQLOptr == TK_SET || optr == TK_IN) { + return TSDB_CODE_INVALID_SQL; + } int64_t val = 0; bool parsed = false; -- GitLab