提交 f94c9a93 编写于 作者: S shenglian zhou

[TD-6145]<feature>:regexp - add match/nmatch relation operator - enhance test

上级 a09cfdfa
......@@ -4513,7 +4513,7 @@ static int32_t validateLikeExpr(tSqlExpr* pExpr, STableMeta* pTableMeta, int32_t
// check for match expression
static int32_t validateMatchExpr(tSqlExpr* pExpr, STableMeta* pTableMeta, int32_t index, char* msgBuf) {
const char* msg1 = "regular expression string should be less than %d characters";
const char* msg2 = "illegal column type for match";
const char* msg2 = "illegal column type for match/nmatch";
const char* msg3 = "invalid regular expression";
tSqlExpr* pLeft = pExpr->pLeft;
......
......@@ -79,6 +79,35 @@ if $rows != 1 then
return -1
endi
sql create table wrong_type(ts timestamp, c0 tinyint, c1 smallint, c2 int, c3 bigint, c4 float, c5 double, c6 bool) tags(t0 tinyint, t1 smallint, t2 int, t3 bigint, t4 float, t5 double, t6 bool)
sql insert into wrong_type_1 using wrong_type tags(1, 2, 3, 4, 5, 6, true) values(now, 1, 2, 3, 4, 5, 6, false)
sql_error select * from wrong_type where ts match '.*'
sql_error select * from wrong_type where ts nmatch '.*'
sql_error select * from wrong_type where c0 match '.*'
sql_error select * from wrong_type where c0 nmatch '.*'
sql_error select * from wrong_type where c1 match '.*'
sql_error select * from wrong_type where c1 nmatch '.*'
sql_error select * from wrong_type where c2 match '.*'
sql_error select * from wrong_type where c2 nmatch '.*'
sql_error select * from wrong_type where c3 match '.*'
sql_error select * from wrong_type where c3 nmatch '.*'
sql_error select * from wrong_type where c4 match '.*'
sql_error select * from wrong_type where c4 nmatch '.*'
sql_error select * from wrong_type where c5 match '.*'
sql_error select * from wrong_type where c6 nmatch '.*'
sql_error select * from wrong_type where t1 match '.*'
sql_error select * from wrong_type where t1 nmatch '.*'
sql_error select * from wrong_type where t2 match '.*'
sql_error select * from wrong_type where t2 match '.*'
sql_error select * from wrong_type where t3 match '.*'
sql_error select * from wrong_type where t3 match '.*'
sql_error select * from wrong_type where t4 match '.*'
sql_error select * from wrong_type where t4 match '.*'
sql_error select * from wrong_type where t5 nmatch '.*'
sql_error select * from wrong_type where t5 nmatch '.*'
sql_error select * from wrong_type where t6 nmatch '.*'
sql_error select * from wrong_type where t6 nmatch '.*'
system sh/exec.sh -n dnode1 -s stop -x SIGINT
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册