Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
f5da576a
TDengine
项目概览
taosdata
/
TDengine
接近 2 年 前同步成功
通知
1192
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
f5da576a
编写于
6月 08, 2022
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix in compare issue
上级
9450c959
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
39 addition
and
10 deletion
+39
-10
source/libs/parser/src/parInsert.c
source/libs/parser/src/parInsert.c
+4
-0
source/libs/parser/src/parTranslater.c
source/libs/parser/src/parTranslater.c
+18
-5
source/libs/qworker/src/qwDbg.c
source/libs/qworker/src/qwDbg.c
+9
-5
source/libs/scalar/src/filter.c
source/libs/scalar/src/filter.c
+8
-0
未找到文件。
source/libs/parser/src/parInsert.c
浏览文件 @
f5da576a
...
@@ -2040,6 +2040,10 @@ int32_t qBuildStmtTagFields(void* pBlock, void* boundTags, int32_t* fieldNum, TA
...
@@ -2040,6 +2040,10 @@ int32_t qBuildStmtTagFields(void* pBlock, void* boundTags, int32_t* fieldNum, TA
return
TSDB_CODE_QRY_APP_ERROR
;
return
TSDB_CODE_QRY_APP_ERROR
;
}
}
if
(
pDataBlock
->
pTableMeta
->
tableType
!=
TSDB_SUPER_TABLE
&&
pDataBlock
->
pTableMeta
->
tableType
!=
TSDB_CHILD_TABLE
)
{
return
TSDB_CODE_TSC_STMT_API_ERROR
;
}
SSchema
*
pSchema
=
getTableTagSchema
(
pDataBlock
->
pTableMeta
);
SSchema
*
pSchema
=
getTableTagSchema
(
pDataBlock
->
pTableMeta
);
if
(
tags
->
numOfBound
<=
0
)
{
if
(
tags
->
numOfBound
<=
0
)
{
*
fieldNum
=
0
;
*
fieldNum
=
0
;
...
...
source/libs/parser/src/parTranslater.c
浏览文件 @
f5da576a
...
@@ -817,6 +817,10 @@ static EDealRes translateArithmeticOperator(STranslateContext* pCxt, SOperatorNo
...
@@ -817,6 +817,10 @@ static EDealRes translateArithmeticOperator(STranslateContext* pCxt, SOperatorNo
return
DEAL_RES_CONTINUE
;
return
DEAL_RES_CONTINUE
;
}
}
static
bool
dataTypeEqual
(
const
SDataType
*
l
,
const
SDataType
*
r
)
{
return
(
l
->
type
==
r
->
type
&&
l
->
bytes
==
r
->
bytes
&&
l
->
precision
==
r
->
precision
&&
l
->
scale
==
r
->
scale
);
}
static
EDealRes
translateComparisonOperator
(
STranslateContext
*
pCxt
,
SOperatorNode
*
pOp
)
{
static
EDealRes
translateComparisonOperator
(
STranslateContext
*
pCxt
,
SOperatorNode
*
pOp
)
{
SDataType
ldt
=
((
SExprNode
*
)(
pOp
->
pLeft
))
->
resType
;
SDataType
ldt
=
((
SExprNode
*
)(
pOp
->
pLeft
))
->
resType
;
SDataType
rdt
=
((
SExprNode
*
)(
pOp
->
pRight
))
->
resType
;
SDataType
rdt
=
((
SExprNode
*
)(
pOp
->
pRight
))
->
resType
;
...
@@ -824,7 +828,20 @@ static EDealRes translateComparisonOperator(STranslateContext* pCxt, SOperatorNo
...
@@ -824,7 +828,20 @@ static EDealRes translateComparisonOperator(STranslateContext* pCxt, SOperatorNo
return
generateDealNodeErrMsg
(
pCxt
,
TSDB_CODE_PAR_WRONG_VALUE_TYPE
,
((
SExprNode
*
)(
pOp
->
pRight
))
->
aliasName
);
return
generateDealNodeErrMsg
(
pCxt
,
TSDB_CODE_PAR_WRONG_VALUE_TYPE
,
((
SExprNode
*
)(
pOp
->
pRight
))
->
aliasName
);
}
}
if
(
OP_TYPE_IN
==
pOp
->
opType
||
OP_TYPE_NOT_IN
==
pOp
->
opType
)
{
if
(
OP_TYPE_IN
==
pOp
->
opType
||
OP_TYPE_NOT_IN
==
pOp
->
opType
)
{
((
SExprNode
*
)
pOp
->
pRight
)
->
resType
=
((
SExprNode
*
)
pOp
->
pLeft
)
->
resType
;
SNodeListNode
*
pRight
=
(
SNodeListNode
*
)
pOp
->
pRight
;
bool
first
=
true
;
SDataType
targetDt
=
{
0
};
SNode
*
pNode
=
NULL
;
FOREACH
(
pNode
,
pRight
->
pNodeList
)
{
SDataType
dt
=
((
SExprNode
*
)
pNode
)
->
resType
;
if
(
first
)
{
targetDt
=
dt
;
first
=
false
;
}
else
if
(
!
dataTypeEqual
(
&
dt
,
&
targetDt
))
{
return
generateDealNodeErrMsg
(
pCxt
,
TSDB_CODE_PAR_WRONG_VALUE_TYPE
,
((
SExprNode
*
)
pNode
)
->
aliasName
);
}
}
pRight
->
dataType
=
targetDt
;
}
}
if
(
nodesIsRegularOp
(
pOp
))
{
if
(
nodesIsRegularOp
(
pOp
))
{
if
(
!
IS_VAR_DATA_TYPE
(((
SExprNode
*
)(
pOp
->
pLeft
))
->
resType
.
type
))
{
if
(
!
IS_VAR_DATA_TYPE
(((
SExprNode
*
)(
pOp
->
pLeft
))
->
resType
.
type
))
{
...
@@ -2015,10 +2032,6 @@ static SNode* createSetOperProject(const char* pTableAlias, SNode* pNode) {
...
@@ -2015,10 +2032,6 @@ static SNode* createSetOperProject(const char* pTableAlias, SNode* pNode) {
return
(
SNode
*
)
pCol
;
return
(
SNode
*
)
pCol
;
}
}
static
bool
dataTypeEqual
(
const
SDataType
*
l
,
const
SDataType
*
r
)
{
return
(
l
->
type
==
r
->
type
&&
l
->
bytes
==
r
->
bytes
&&
l
->
precision
==
r
->
precision
&&
l
->
scale
==
r
->
scale
);
}
static
int32_t
createCastFunc
(
STranslateContext
*
pCxt
,
SNode
*
pExpr
,
SDataType
dt
,
SNode
**
pCast
)
{
static
int32_t
createCastFunc
(
STranslateContext
*
pCxt
,
SNode
*
pExpr
,
SDataType
dt
,
SNode
**
pCast
)
{
SFunctionNode
*
pFunc
=
nodesMakeNode
(
QUERY_NODE_FUNCTION
);
SFunctionNode
*
pFunc
=
nodesMakeNode
(
QUERY_NODE_FUNCTION
);
if
(
NULL
==
pFunc
)
{
if
(
NULL
==
pFunc
)
{
...
...
source/libs/qworker/src/qwDbg.c
浏览文件 @
f5da576a
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
#include "tmsg.h"
#include "tmsg.h"
#include "tname.h"
#include "tname.h"
SQWDebug
gQWDebug
=
{.
statusEnable
=
true
,
.
dumpEnable
=
tru
e
};
SQWDebug
gQWDebug
=
{.
statusEnable
=
true
,
.
dumpEnable
=
fals
e
};
int32_t
qwDbgValidateStatus
(
QW_FPARAMS_DEF
,
int8_t
oriStatus
,
int8_t
newStatus
,
bool
*
ignore
)
{
int32_t
qwDbgValidateStatus
(
QW_FPARAMS_DEF
,
int8_t
oriStatus
,
int8_t
newStatus
,
bool
*
ignore
)
{
if
(
!
gQWDebug
.
statusEnable
)
{
if
(
!
gQWDebug
.
statusEnable
)
{
...
@@ -97,7 +97,11 @@ _return:
...
@@ -97,7 +97,11 @@ _return:
QW_RET
(
code
);
QW_RET
(
code
);
}
}
void
qwDbgDumpSchInfo
(
SQWSchStatus
*
sch
,
int32_t
i
)
{}
void
qwDbgDumpSchInfo
(
SQWorker
*
mgmt
,
SQWSchStatus
*
sch
,
int32_t
i
)
{
QW_LOCK
(
QW_READ
,
&
sch
->
tasksLock
);
QW_DLOG
(
"the %dth scheduler status, hbBrokenTs:%"
PRId64
",taskNum:%d"
,
i
,
sch
->
hbBrokenTs
,
taosHashGetSize
(
sch
->
tasksHash
));
QW_UNLOCK
(
QW_READ
,
&
sch
->
tasksLock
);
}
void
qwDbgDumpMgmtInfo
(
SQWorker
*
mgmt
)
{
void
qwDbgDumpMgmtInfo
(
SQWorker
*
mgmt
)
{
if
(
!
gQWDebug
.
dumpEnable
)
{
if
(
!
gQWDebug
.
dumpEnable
)
{
...
@@ -106,7 +110,7 @@ void qwDbgDumpMgmtInfo(SQWorker *mgmt) {
...
@@ -106,7 +110,7 @@ void qwDbgDumpMgmtInfo(SQWorker *mgmt) {
QW_LOCK
(
QW_READ
,
&
mgmt
->
schLock
);
QW_LOCK
(
QW_READ
,
&
mgmt
->
schLock
);
/*QW_DUMP("total remain schduler num:%d", taosHashGetSize(mgmt->schHash));*/
QW_DUMP
(
"total remain scheduler num %d"
,
taosHashGetSize
(
mgmt
->
schHash
));
void
*
key
=
NULL
;
void
*
key
=
NULL
;
size_t
keyLen
=
0
;
size_t
keyLen
=
0
;
...
@@ -116,14 +120,14 @@ void qwDbgDumpMgmtInfo(SQWorker *mgmt) {
...
@@ -116,14 +120,14 @@ void qwDbgDumpMgmtInfo(SQWorker *mgmt) {
void
*
pIter
=
taosHashIterate
(
mgmt
->
schHash
,
NULL
);
void
*
pIter
=
taosHashIterate
(
mgmt
->
schHash
,
NULL
);
while
(
pIter
)
{
while
(
pIter
)
{
sch
=
(
SQWSchStatus
*
)
pIter
;
sch
=
(
SQWSchStatus
*
)
pIter
;
qwDbgDumpSchInfo
(
sch
,
i
);
qwDbgDumpSchInfo
(
mgmt
,
sch
,
i
);
++
i
;
++
i
;
pIter
=
taosHashIterate
(
mgmt
->
schHash
,
pIter
);
pIter
=
taosHashIterate
(
mgmt
->
schHash
,
pIter
);
}
}
QW_UNLOCK
(
QW_READ
,
&
mgmt
->
schLock
);
QW_UNLOCK
(
QW_READ
,
&
mgmt
->
schLock
);
/*QW_DUMP("total remain ctx num:%d", taosHashGetSize(mgmt->ctxHash));*/
QW_DUMP
(
"total remain ctx num %d"
,
taosHashGetSize
(
mgmt
->
ctxHash
));
}
}
source/libs/scalar/src/filter.c
浏览文件 @
f5da576a
...
@@ -3669,6 +3669,14 @@ EDealRes fltReviseRewriter(SNode** pNode, void* pContext) {
...
@@ -3669,6 +3669,14 @@ EDealRes fltReviseRewriter(SNode** pNode, void* pContext) {
stat
->
scalarMode
=
true
;
stat
->
scalarMode
=
true
;
return
DEAL_RES_CONTINUE
;
return
DEAL_RES_CONTINUE
;
}
}
}
else
{
SColumnNode
*
refNode
=
(
SColumnNode
*
)
node
->
pLeft
;
SNodeListNode
*
listNode
=
(
SNodeListNode
*
)
node
->
pRight
;
int32_t
type
=
vectorGetConvertType
(
refNode
->
node
.
resType
.
type
,
listNode
->
dataType
.
type
);
if
(
0
!=
type
&&
type
!=
refNode
->
node
.
resType
.
type
)
{
stat
->
scalarMode
=
true
;
return
DEAL_RES_CONTINUE
;
}
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录