From ca1cf67ecd7e8f4fdb9e76ee40e1b43b504b3988 Mon Sep 17 00:00:00 2001 From: Bomin Zhang Date: Tue, 17 Nov 2020 17:41:47 +0800 Subject: [PATCH] [TD-2106]: cannot find table by alias --- src/client/src/tscSQLParser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index b55326bbd3..069f7303d6 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -6412,7 +6412,7 @@ int32_t doCheckForQuery(SSqlObj* pSql, SQuerySQL* pQuerySql, int32_t index) { return code; } - tVariantListItem* p1 = taosArrayGet(pQuerySql->from, i); + tVariantListItem* p1 = taosArrayGet(pQuerySql->from, i + 1); if (p1->pVar.nType != TSDB_DATA_TYPE_BINARY) { return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg11); } -- GitLab