Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
7d07721a
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
7d07721a
编写于
9月 08, 2021
作者:
W
wpan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
support tag filter
上级
9dabb804
变更
6
展开全部
隐藏空白更改
内联
并排
Showing
6 changed file
with
1685 addition
and
825 deletion
+1685
-825
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+10
-6
src/client/src/tscSubquery.c
src/client/src/tscSubquery.c
+5
-1
src/util/src/tcompare.c
src/util/src/tcompare.c
+1
-1
tests/script/general/parser/condition.sim
tests/script/general/parser/condition.sim
+15
-3
tests/script/general/parser/condition_query.sim
tests/script/general/parser/condition_query.sim
+23
-814
tests/script/general/parser/condition_query2.sim
tests/script/general/parser/condition_query2.sim
+1631
-0
未找到文件。
src/client/src/tscSQLParser.c
浏览文件 @
7d07721a
...
...
@@ -8865,12 +8865,16 @@ int32_t exprTreeFromSqlExpr(SSqlCmd* pCmd, tExprNode **pExpr, const tSqlExpr* pS
tVariantAssign
((
*
pExpr
)
->
pVal
,
&
pSqlExpr
->
value
);
STableMeta
*
pTableMeta
=
tscGetMetaInfo
(
pQueryInfo
,
0
)
->
pTableMeta
;
if
(
pCols
!=
NULL
&&
taosArrayGetSize
(
pCols
)
>
0
)
{
SColIndex
*
idx
=
taosArrayGet
(
pCols
,
0
);
SSchema
*
pSchema
=
tscGetTableColumnSchema
(
pTableMeta
,
idx
->
colIndex
);
// convert time by precision
if
(
pSchema
!=
NULL
&&
TSDB_DATA_TYPE_TIMESTAMP
==
pSchema
->
type
&&
TSDB_DATA_TYPE_BINARY
==
(
*
pExpr
)
->
pVal
->
nType
)
{
ret
=
setColumnFilterInfoForTimestamp
(
pCmd
,
pQueryInfo
,
(
*
pExpr
)
->
pVal
);
if
(
pCols
!=
NULL
)
{
size_t
colSize
=
taosArrayGetSize
(
pCols
);
if
(
colSize
>
0
)
{
SColIndex
*
idx
=
taosArrayGet
(
pCols
,
colSize
-
1
);
SSchema
*
pSchema
=
tscGetTableColumnSchema
(
pTableMeta
,
idx
->
colIndex
);
// convert time by precision
if
(
pSchema
!=
NULL
&&
TSDB_DATA_TYPE_TIMESTAMP
==
pSchema
->
type
&&
TSDB_DATA_TYPE_BINARY
==
(
*
pExpr
)
->
pVal
->
nType
)
{
ret
=
setColumnFilterInfoForTimestamp
(
pCmd
,
pQueryInfo
,
(
*
pExpr
)
->
pVal
);
}
}
}
return
ret
;
...
...
src/client/src/tscSubquery.c
浏览文件 @
7d07721a
...
...
@@ -1347,7 +1347,11 @@ static void tsCompRetrieveCallback(void* param, TAOS_RES* tres, int32_t numOfRow
pCmd
->
command
=
TSDB_SQL_SELECT
;
tscResetForNextRetrieve
(
&
pSql
->
res
);
assert
(
pSupporter
->
f
==
NULL
);
if
(
pSupporter
->
f
!=
NULL
)
{
fclose
(
pSupporter
->
f
);
pSupporter
->
f
=
NULL
;
}
taosGetTmpfilePath
(
"ts-join"
,
pSupporter
->
path
);
// TODO check for failure
...
...
src/util/src/tcompare.c
浏览文件 @
7d07721a
...
...
@@ -286,7 +286,7 @@ int WCSPatternMatch(const wchar_t *patterStr, const wchar_t *str, size_t size, c
if
(
c
==
matchAll
)
{
/* Match "%" */
while
((
c
=
patterStr
[
i
++
])
==
matchAll
||
c
==
matchOne
)
{
if
(
c
==
matchOne
&&
(
j
>
size
||
str
[
j
++
]
==
0
))
{
if
(
c
==
matchOne
&&
(
j
>
=
size
||
str
[
j
++
]
==
0
))
{
return
TSDB_PATTERN_NOWILDCARDMATCH
;
}
}
...
...
tests/script/general/parser/condition.sim
浏览文件 @
7d07721a
...
...
@@ -2,7 +2,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/cfg.sh -n dnode1 -c maxtablespervnode -v
4
system sh/cfg.sh -n dnode1 -c maxtablespervnode -v
6
system sh/cfg.sh -n dnode1 -c cache -v 1
system sh/exec.sh -n dnode1 -s start
...
...
@@ -143,6 +143,8 @@ sql create table tb5_3 using stb5 tags('2021-05-05 18:19:03',3,3.0,3,3,3,3.0,fal
sql create table tb5_4 using stb5 tags('2021-05-05 18:19:04',4,4.0,4,4,4,4.0,false,'444444444','4')
sql create table tb5_5 using stb5 tags('2021-05-05 18:19:05',5,5.0,5,5,5,5.0,true,'555555555','5')
sql create table tb5_6 using stb5 tags('2021-05-05 18:19:06',6,6.0,6,6,6,6.0,true,'666666666','6')
sql create table tb5_7 using stb5 tags(NULL,7,NULL,7,NULL,7,NULL,false,NULL,'7')
sql create table tb5_8 using stb5 tags('2021-05-05 18:19:08',NULL,8.0,NULL,8,NULL,8.0,NULL,'888888888',NULL)
sql insert into tb5_1 values ('2021-05-05 18:19:00',1,1.0,1,1,1,1.0,true ,'1','1')
sql insert into tb5_1 values ('2021-05-05 18:19:01',2,2.0,2,2,2,2.0,true ,'2','2')
...
...
@@ -173,13 +175,23 @@ sql insert into tb5_6 values ('2021-05-05 18:19:25',62,62.0,62,62,62,62.0,true ,
sql insert into tb5_6 values ('2021-05-05 18:19:26',63,63.0,63,63,63,63.0,false,'63','63')
sql insert into tb5_6 values ('2021-05-05 18:19:27',64,64.0,64,64,64,64.0,false,'64','64')
sql insert into tb5_6 values ('2021-05-05 18:19:28',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL)
sql insert into tb5_7 values ('2021-05-05 18:19:29',71,71.0,71,71,71,71.0,true ,'71','71')
sql insert into tb5_7 values ('2021-05-05 18:19:30',72,72.0,72,72,72,72.0,true ,'72','72')
sql insert into tb5_7 values ('2021-05-05 18:19:31',73,73.0,73,73,73,73.0,false,'73','73')
sql insert into tb5_7 values ('2021-05-05 18:19:32',74,74.0,74,74,74,74.0,false,'74','74')
sql insert into tb5_7 values ('2021-05-05 18:19:33',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL)
sql insert into tb5_8 values ('2021-05-05 18:19:34',81,81.0,81,81,81,81.0,true ,'81','81')
sql insert into tb5_8 values ('2021-05-05 18:19:35',82,82.0,82,82,82,82.0,true ,'82','82')
sql insert into tb5_8 values ('2021-05-05 18:19:36',83,83.0,83,83,83,83.0,false,'83','83')
sql insert into tb5_8 values ('2021-05-05 18:19:37',84,84.0,84,84,84,84.0,false,'84','84')
sql insert into tb5_8 values ('2021-05-05 18:19:38',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL)
sleep 100
sql connect
run general/parser/condition_query.sim
run general/parser/condition_query2.sim
print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
...
...
@@ -190,4 +202,4 @@ sql connect
sleep 100
run general/parser/condition_query.sim
run general/parser/condition_query2.sim
tests/script/general/parser/condition_query.sim
浏览文件 @
7d07721a
此差异已折叠。
点击以展开。
tests/script/general/parser/condition_query2.sim
0 → 100644
浏览文件 @
7d07721a
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录