提交 6c4dd103 编写于 作者: D dapan1121

[TD-10630]add child/normal table join check

上级 d0ed6f42
...@@ -4893,6 +4893,7 @@ static int32_t validateJoinExpr(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SCondExpr ...@@ -4893,6 +4893,7 @@ static int32_t validateJoinExpr(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SCondExpr
const char* msg1 = "super table join requires tags column"; const char* msg1 = "super table join requires tags column";
const char* msg2 = "timestamp join condition missing"; const char* msg2 = "timestamp join condition missing";
const char* msg3 = "condition missing for join query"; const char* msg3 = "condition missing for join query";
const char* msg4 = "only ts column join allowed";
if (!QUERY_IS_JOIN_QUERY(pQueryInfo->type)) { if (!QUERY_IS_JOIN_QUERY(pQueryInfo->type)) {
if (pQueryInfo->numOfTables == 1) { if (pQueryInfo->numOfTables == 1) {
...@@ -4910,6 +4911,8 @@ static int32_t validateJoinExpr(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SCondExpr ...@@ -4910,6 +4911,8 @@ static int32_t validateJoinExpr(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SCondExpr
if (pCondExpr->pJoinExpr == NULL) { if (pCondExpr->pJoinExpr == NULL) {
return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg1); return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg1);
} }
} else if ((!UTIL_TABLE_IS_SUPER_TABLE(pTableMetaInfo)) && pCondExpr->pJoinExpr) {
return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg4);
} }
if (!pCondExpr->tsJoin) { if (!pCondExpr->tsJoin) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册