Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
09cb5753
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
提交
09cb5753
编写于
8月 19, 2022
作者:
X
Xiaoyu Wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: escape character problem in auto create table insert
上级
98fc185e
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
15 addition
and
16 deletion
+15
-16
include/util/tdef.h
include/util/tdef.h
+6
-6
source/libs/executor/src/executor.c
source/libs/executor/src/executor.c
+8
-8
source/libs/executor/src/timewindowoperator.c
source/libs/executor/src/timewindowoperator.c
+1
-1
source/libs/nodes/src/nodesCodeFuncs.c
source/libs/nodes/src/nodesCodeFuncs.c
+0
-1
未找到文件。
include/util/tdef.h
浏览文件 @
09cb5753
...
@@ -132,14 +132,14 @@ typedef enum EOperatorType {
...
@@ -132,14 +132,14 @@ typedef enum EOperatorType {
OP_TYPE_DIV
,
OP_TYPE_DIV
,
OP_TYPE_REM
,
OP_TYPE_REM
,
// unary arithmetic operator
// unary arithmetic operator
OP_TYPE_MINUS
,
OP_TYPE_MINUS
=
20
,
// bitwise operator
// bitwise operator
OP_TYPE_BIT_AND
,
OP_TYPE_BIT_AND
=
30
,
OP_TYPE_BIT_OR
,
OP_TYPE_BIT_OR
,
// binary comparison operator
// binary comparison operator
OP_TYPE_GREATER_THAN
,
OP_TYPE_GREATER_THAN
=
40
,
OP_TYPE_GREATER_EQUAL
,
OP_TYPE_GREATER_EQUAL
,
OP_TYPE_LOWER_THAN
,
OP_TYPE_LOWER_THAN
,
OP_TYPE_LOWER_EQUAL
,
OP_TYPE_LOWER_EQUAL
,
...
@@ -152,7 +152,7 @@ typedef enum EOperatorType {
...
@@ -152,7 +152,7 @@ typedef enum EOperatorType {
OP_TYPE_MATCH
,
OP_TYPE_MATCH
,
OP_TYPE_NMATCH
,
OP_TYPE_NMATCH
,
// unary comparison operator
// unary comparison operator
OP_TYPE_IS_NULL
,
OP_TYPE_IS_NULL
=
100
,
OP_TYPE_IS_NOT_NULL
,
OP_TYPE_IS_NOT_NULL
,
OP_TYPE_IS_TRUE
,
OP_TYPE_IS_TRUE
,
OP_TYPE_IS_FALSE
,
OP_TYPE_IS_FALSE
,
...
@@ -162,11 +162,11 @@ typedef enum EOperatorType {
...
@@ -162,11 +162,11 @@ typedef enum EOperatorType {
OP_TYPE_IS_NOT_UNKNOWN
,
OP_TYPE_IS_NOT_UNKNOWN
,
// json operator
// json operator
OP_TYPE_JSON_GET_VALUE
,
OP_TYPE_JSON_GET_VALUE
=
150
,
OP_TYPE_JSON_CONTAINS
,
OP_TYPE_JSON_CONTAINS
,
// internal operator
// internal operator
OP_TYPE_ASSIGN
OP_TYPE_ASSIGN
=
250
}
EOperatorType
;
}
EOperatorType
;
#define OP_TYPE_CALC_MAX OP_TYPE_BIT_OR
#define OP_TYPE_CALC_MAX OP_TYPE_BIT_OR
...
...
source/libs/executor/src/executor.c
浏览文件 @
09cb5753
...
@@ -348,7 +348,7 @@ int32_t qCreateExecTask(SReadHandle* readHandle, int32_t vgId, uint64_t taskId,
...
@@ -348,7 +348,7 @@ int32_t qCreateExecTask(SReadHandle* readHandle, int32_t vgId, uint64_t taskId,
taosThreadOnce
(
&
initPoolOnce
,
initRefPool
);
taosThreadOnce
(
&
initPoolOnce
,
initRefPool
);
atexit
(
cleanupRefPool
);
atexit
(
cleanupRefPool
);
qDebug
(
"start to create subplan task, TID:0x%"
PRIx64
" QID:0x%"
PRIx64
,
taskId
,
pSubplan
->
id
.
queryId
);
qDebug
(
"start to create subplan task, TID:0x%"
PRIx64
" QID:0x%"
PRIx64
,
taskId
,
pSubplan
->
id
.
queryId
);
int32_t
code
=
createExecTaskInfoImpl
(
pSubplan
,
pTask
,
readHandle
,
taskId
,
sql
,
model
);
int32_t
code
=
createExecTaskInfoImpl
(
pSubplan
,
pTask
,
readHandle
,
taskId
,
sql
,
model
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
...
@@ -374,7 +374,7 @@ int32_t qCreateExecTask(SReadHandle* readHandle, int32_t vgId, uint64_t taskId,
...
@@ -374,7 +374,7 @@ int32_t qCreateExecTask(SReadHandle* readHandle, int32_t vgId, uint64_t taskId,
}
}
}
}
qDebug
(
"subplan task create completed, TID:0x%"
PRIx64
" QID:0x%"
PRIx64
,
taskId
,
pSubplan
->
id
.
queryId
);
qDebug
(
"subplan task create completed, TID:0x%"
PRIx64
" QID:0x%"
PRIx64
,
taskId
,
pSubplan
->
id
.
queryId
);
_error:
_error:
// if failed to add ref for all tables in this query, abort current query
// if failed to add ref for all tables in this query, abort current query
...
@@ -427,7 +427,7 @@ int waitMoment(SQInfo* pQInfo) {
...
@@ -427,7 +427,7 @@ int waitMoment(SQInfo* pQInfo) {
#endif
#endif
static
void
freeBlock
(
void
*
param
)
{
static
void
freeBlock
(
void
*
param
)
{
SSDataBlock
*
pBlock
=
*
(
SSDataBlock
**
)
param
;
SSDataBlock
*
pBlock
=
*
(
SSDataBlock
**
)
param
;
blockDataDestroy
(
pBlock
);
blockDataDestroy
(
pBlock
);
}
}
...
@@ -467,12 +467,12 @@ int32_t qExecTaskOpt(qTaskInfo_t tinfo, SArray* pResList, uint64_t* useconds) {
...
@@ -467,12 +467,12 @@ int32_t qExecTaskOpt(qTaskInfo_t tinfo, SArray* pResList, uint64_t* useconds) {
qDebug
(
"%s execTask is launched"
,
GET_TASKID
(
pTaskInfo
));
qDebug
(
"%s execTask is launched"
,
GET_TASKID
(
pTaskInfo
));
int32_t
current
=
0
;
int32_t
current
=
0
;
SSDataBlock
*
pRes
=
NULL
;
SSDataBlock
*
pRes
=
NULL
;
int64_t
st
=
taosGetTimestampUs
();
int64_t
st
=
taosGetTimestampUs
();
while
((
pRes
=
pTaskInfo
->
pRoot
->
fpSet
.
getNextFn
(
pTaskInfo
->
pRoot
))
!=
NULL
)
{
while
((
pRes
=
pTaskInfo
->
pRoot
->
fpSet
.
getNextFn
(
pTaskInfo
->
pRoot
))
!=
NULL
)
{
SSDataBlock
*
p
=
createOneDataBlock
(
pRes
,
true
);
SSDataBlock
*
p
=
createOneDataBlock
(
pRes
,
true
);
current
+=
p
->
info
.
rows
;
current
+=
p
->
info
.
rows
;
ASSERT
(
p
->
info
.
rows
>
0
);
ASSERT
(
p
->
info
.
rows
>
0
);
...
@@ -494,7 +494,7 @@ int32_t qExecTaskOpt(qTaskInfo_t tinfo, SArray* pResList, uint64_t* useconds) {
...
@@ -494,7 +494,7 @@ int32_t qExecTaskOpt(qTaskInfo_t tinfo, SArray* pResList, uint64_t* useconds) {
uint64_t
total
=
pTaskInfo
->
pRoot
->
resultInfo
.
totalRows
;
uint64_t
total
=
pTaskInfo
->
pRoot
->
resultInfo
.
totalRows
;
qDebug
(
"%s task suspended, %d rows in %d blocks returned, total:%"
PRId64
" rows, in sinkNode:%d, elapsed:%.2f ms"
,
qDebug
(
"%s task suspended, %d rows in %d blocks returned, total:%"
PRId64
" rows, in sinkNode:%d, elapsed:%.2f ms"
,
GET_TASKID
(
pTaskInfo
),
current
,
(
int32_t
)
taosArrayGetSize
(
pResList
),
total
,
0
,
el
/
1000
.
0
);
GET_TASKID
(
pTaskInfo
),
current
,
(
int32_t
)
taosArrayGetSize
(
pResList
),
total
,
0
,
el
/
1000
.
0
);
atomic_store_64
(
&
pTaskInfo
->
owner
,
0
);
atomic_store_64
(
&
pTaskInfo
->
owner
,
0
);
return
pTaskInfo
->
code
;
return
pTaskInfo
->
code
;
...
@@ -632,7 +632,7 @@ int32_t qExtractStreamScanner(qTaskInfo_t tinfo, void** scanner) {
...
@@ -632,7 +632,7 @@ int32_t qExtractStreamScanner(qTaskInfo_t tinfo, void** scanner) {
SOperatorInfo
*
pOperator
=
pTaskInfo
->
pRoot
;
SOperatorInfo
*
pOperator
=
pTaskInfo
->
pRoot
;
while
(
1
)
{
while
(
1
)
{
uint
8
_t
type
=
pOperator
->
operatorType
;
uint
16
_t
type
=
pOperator
->
operatorType
;
if
(
type
==
QUERY_NODE_PHYSICAL_PLAN_STREAM_SCAN
)
{
if
(
type
==
QUERY_NODE_PHYSICAL_PLAN_STREAM_SCAN
)
{
*
scanner
=
pOperator
->
info
;
*
scanner
=
pOperator
->
info
;
return
0
;
return
0
;
...
@@ -691,7 +691,7 @@ int32_t qStreamPrepareScan(qTaskInfo_t tinfo, const STqOffsetVal* pOffset) {
...
@@ -691,7 +691,7 @@ int32_t qStreamPrepareScan(qTaskInfo_t tinfo, const STqOffsetVal* pOffset) {
pTaskInfo
->
streamInfo
.
prepareStatus
=
*
pOffset
;
pTaskInfo
->
streamInfo
.
prepareStatus
=
*
pOffset
;
if
(
!
tOffsetEqual
(
pOffset
,
&
pTaskInfo
->
streamInfo
.
lastStatus
))
{
if
(
!
tOffsetEqual
(
pOffset
,
&
pTaskInfo
->
streamInfo
.
lastStatus
))
{
while
(
1
)
{
while
(
1
)
{
uint
8
_t
type
=
pOperator
->
operatorType
;
uint
16
_t
type
=
pOperator
->
operatorType
;
pOperator
->
status
=
OP_OPENED
;
pOperator
->
status
=
OP_OPENED
;
// TODO add more check
// TODO add more check
if
(
type
!=
QUERY_NODE_PHYSICAL_PLAN_STREAM_SCAN
)
{
if
(
type
!=
QUERY_NODE_PHYSICAL_PLAN_STREAM_SCAN
)
{
...
...
source/libs/executor/src/timewindowoperator.c
浏览文件 @
09cb5753
...
@@ -3541,7 +3541,7 @@ void initDummyFunction(SqlFunctionCtx* pDummy, SqlFunctionCtx* pCtx, int32_t num
...
@@ -3541,7 +3541,7 @@ void initDummyFunction(SqlFunctionCtx* pDummy, SqlFunctionCtx* pCtx, int32_t num
}
}
void
initDownStream
(
SOperatorInfo
*
downstream
,
SStreamAggSupporter
*
pAggSup
,
int64_t
gap
,
int64_t
waterMark
,
void
initDownStream
(
SOperatorInfo
*
downstream
,
SStreamAggSupporter
*
pAggSup
,
int64_t
gap
,
int64_t
waterMark
,
uint
8
_t
type
)
{
uint
16
_t
type
)
{
ASSERT
(
downstream
->
operatorType
==
QUERY_NODE_PHYSICAL_PLAN_STREAM_SCAN
);
ASSERT
(
downstream
->
operatorType
==
QUERY_NODE_PHYSICAL_PLAN_STREAM_SCAN
);
SStreamScanInfo
*
pScanInfo
=
downstream
->
info
;
SStreamScanInfo
*
pScanInfo
=
downstream
->
info
;
pScanInfo
->
sessionSup
=
(
SessionWindowSupporter
){.
pStreamAggSup
=
pAggSup
,
.
gap
=
gap
,
.
parentType
=
type
};
pScanInfo
->
sessionSup
=
(
SessionWindowSupporter
){.
pStreamAggSup
=
pAggSup
,
.
gap
=
gap
,
.
parentType
=
type
};
...
...
source/libs/nodes/src/nodesCodeFuncs.c
浏览文件 @
09cb5753
...
@@ -4673,7 +4673,6 @@ static int32_t jsonToNode(const SJson* pJson, void* pObj) {
...
@@ -4673,7 +4673,6 @@ static int32_t jsonToNode(const SJson* pJson, void* pObj) {
int32_t
code
;
int32_t
code
;
tjsonGetNumberValue
(
pJson
,
jkNodeType
,
pNode
->
type
,
code
);
tjsonGetNumberValue
(
pJson
,
jkNodeType
,
pNode
->
type
,
code
);
;
if
(
TSDB_CODE_SUCCESS
==
code
)
{
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
tjsonToObject
(
pJson
,
nodesNodeName
(
pNode
->
type
),
jsonToSpecificNode
,
pNode
);
code
=
tjsonToObject
(
pJson
,
nodesNodeName
(
pNode
->
type
),
jsonToSpecificNode
,
pNode
);
if
(
TSDB_CODE_SUCCESS
!=
code
)
{
if
(
TSDB_CODE_SUCCESS
!=
code
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录