diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index d025ffa0c91883cf1383b835b8018fef08badde6..1e23e9e56eeabde993020f0a6c45b81390b33d08 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -2029,7 +2029,6 @@ int32_t validateSelectNodeList(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SArray* pS const char* msg6 = "not support distinct mixed with join"; const char* msg7 = "not support distinct mixed with groupby"; const char* msg8 = "not support distinct in nest query"; - const char* msg9 = "not support group by in block func"; // too many result columns not support order by in query if (taosArrayGetSize(pSelNodeList) > TSDB_MAX_COLUMNS) { @@ -2065,10 +2064,6 @@ int32_t validateSelectNodeList(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SArray* pS return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg6); } - if (pItem->pNode->functionId == TSDB_FUNC_BLKINFO && pQueryInfo->groupbyExpr.numOfGroupCols > 0) { - return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg9); - } - SUdfInfo* pUdfInfo = NULL; if (pItem->pNode->functionId < 0) { pUdfInfo = isValidUdf(pQueryInfo->pUdfInfo, pItem->pNode->Expr.operand.z, pItem->pNode->Expr.operand.n); diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index 8c6380687f33ef5f618b6a5910d6efe31eaa7f40..c8a6425c91ad91ac38887309e607a1b8fddfe18e 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -166,7 +166,7 @@ bool tscQueryTags(SQueryInfo* pQueryInfo) { continue; } - if (functId != TSDB_FUNC_TAGPRJ && functId != TSDB_FUNC_TID_TAG) { + if (functId != TSDB_FUNC_TAGPRJ && functId != TSDB_FUNC_TID_TAG && functId != TSDB_FUNC_BLKINFO) { return false; } }