提交 25540e01 编写于 作者: A Alex Duan

[TS-238]<feature>(tsdb): check timestamp must be in an interval

上级 6ed6196f
......@@ -6459,8 +6459,7 @@ int32_t validateWhereNode(SQueryInfo* pQueryInfo, tSqlExpr** pExpr, SSqlObj* pSq
}
const char* msg1 = "invalid expression";
// const char* msg2 = "invalid filter expression";
const char* msg2 = "the timestamp column condition must be in an interval";
int32_t ret = TSDB_CODE_SUCCESS;
// tags query condition may be larger than 512bytes, therefore, we need to prepare enough large space
......@@ -6510,6 +6509,11 @@ int32_t validateWhereNode(SQueryInfo* pQueryInfo, tSqlExpr** pExpr, SSqlObj* pSq
goto PARSE_WHERE_EXIT;
}
// check timestamp range
if (pQueryInfo->window.skey > pQueryInfo->window.ekey) {
return invalidOperationMsg(tscGetErrorMsgPayload(&pSql->cmd), msg2);
}
// get the tag query condition
if ((ret = getTagQueryCondExpr(&pSql->cmd, pQueryInfo, &condExpr)) != TSDB_CODE_SUCCESS) {
goto PARSE_WHERE_EXIT;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册