Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
8a7d8147
T
TDengine
项目概览
taosdata
/
TDengine
接近 2 年 前同步成功
通知
1192
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看板
未验证
提交
8a7d8147
编写于
7月 23, 2022
作者:
X
Xiaoyu Wang
提交者:
GitHub
7月 23, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #15333 from taosdata/feature/3.0_debug_wxy
fix: semantic check when last(*) and column are together
上级
ca7fe4e9
84266350
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
34 addition
and
6 deletion
+34
-6
source/dnode/vnode/src/meta/metaTable.c
source/dnode/vnode/src/meta/metaTable.c
+4
-1
source/libs/command/inc/commandInt.h
source/libs/command/inc/commandInt.h
+1
-0
source/libs/command/src/explain.c
source/libs/command/src/explain.c
+3
-1
source/libs/parser/src/parAstCreater.c
source/libs/parser/src/parAstCreater.c
+1
-1
source/libs/parser/src/parTranslater.c
source/libs/parser/src/parTranslater.c
+24
-2
source/libs/planner/src/planLogicCreater.c
source/libs/planner/src/planLogicCreater.c
+1
-1
未找到文件。
source/dnode/vnode/src/meta/metaTable.c
浏览文件 @
8a7d8147
...
...
@@ -442,7 +442,7 @@ int metaTtlDropTable(SMeta *pMeta, int64_t ttl, SArray *tbUids) {
if
(
ret
!=
0
)
{
return
ret
;
}
if
(
taosArrayGetSize
(
tbUids
)
==
0
){
if
(
taosArrayGetSize
(
tbUids
)
==
0
)
{
return
0
;
}
...
...
@@ -811,6 +811,9 @@ static int metaUpdateTableTagVal(SMeta *pMeta, int64_t version, SVAlterTbReq *pA
for
(
int32_t
i
=
0
;
i
<
pTagSchema
->
nCols
;
i
++
)
{
SSchema
*
pCol
=
&
pTagSchema
->
pSchema
[
i
];
if
(
iCol
==
i
)
{
if
(
pAlterTbReq
->
isNull
)
{
continue
;
}
STagVal
val
=
{
0
};
val
.
type
=
pCol
->
type
;
val
.
cid
=
pCol
->
colId
;
...
...
source/libs/command/inc/commandInt.h
浏览文件 @
8a7d8147
...
...
@@ -28,6 +28,7 @@ extern "C" {
//newline area
#define EXPLAIN_TAG_SCAN_FORMAT "Tag Scan on %s"
#define EXPLAIN_TBL_SCAN_FORMAT "Table Scan on %s"
#define EXPLAIN_TBL_MERGE_SCAN_FORMAT "Table Merge Scan on %s"
#define EXPLAIN_SYSTBL_SCAN_FORMAT "System Table Scan on %s"
#define EXPLAIN_DISTBLK_SCAN_FORMAT "Block Dist Scan on %s"
#define EXPLAIN_LASTROW_SCAN_FORMAT "Last Row Scan on %s"
...
...
source/libs/command/src/explain.c
浏览文件 @
8a7d8147
...
...
@@ -433,7 +433,9 @@ int32_t qExplainResNodeToRowsImpl(SExplainResNode *pResNode, SExplainCtx *ctx, i
case
QUERY_NODE_PHYSICAL_PLAN_TABLE_MERGE_SCAN
:
case
QUERY_NODE_PHYSICAL_PLAN_TABLE_SCAN
:
{
STableScanPhysiNode
*
pTblScanNode
=
(
STableScanPhysiNode
*
)
pNode
;
EXPLAIN_ROW_NEW
(
level
,
EXPLAIN_TBL_SCAN_FORMAT
,
pTblScanNode
->
scan
.
tableName
.
tname
);
EXPLAIN_ROW_NEW
(
level
,
QUERY_NODE_PHYSICAL_PLAN_TABLE_MERGE_SCAN
==
pNode
->
type
?
EXPLAIN_TBL_MERGE_SCAN_FORMAT
:
EXPLAIN_TBL_SCAN_FORMAT
,
pTblScanNode
->
scan
.
tableName
.
tname
);
EXPLAIN_ROW_APPEND
(
EXPLAIN_LEFT_PARENTHESIS_FORMAT
);
if
(
pResNode
->
pExecInfo
)
{
QRY_ERR_RET
(
qExplainBufAppendExecInfo
(
pResNode
->
pExecInfo
,
tbuf
,
&
tlen
));
...
...
source/libs/parser/src/parAstCreater.c
浏览文件 @
8a7d8147
...
...
@@ -523,7 +523,7 @@ SNode* createTempTableNode(SAstCreateContext* pCxt, SNode* pSubquery, const STok
if
(
NULL
!=
pTableAlias
&&
TK_NK_NIL
!=
pTableAlias
->
type
)
{
COPY_STRING_FORM_ID_TOKEN
(
tempTable
->
table
.
tableAlias
,
pTableAlias
);
}
else
{
sprintf
(
tempTable
->
table
.
tableAlias
,
"%p"
,
tempTable
);
taosRandStr
(
tempTable
->
table
.
tableAlias
,
8
);
}
if
(
QUERY_NODE_SELECT_STMT
==
nodeType
(
pSubquery
))
{
strcpy
(((
SSelectStmt
*
)
pSubquery
)
->
stmtName
,
tempTable
->
table
.
tableAlias
);
...
...
source/libs/parser/src/parTranslater.c
浏览文件 @
8a7d8147
...
...
@@ -1220,6 +1220,14 @@ static int32_t translateMultiResFunc(STranslateContext* pCxt, SFunctionNode* pFu
}
return
TSDB_CODE_SUCCESS
;
}
static
int32_t
getMultiResFuncNum
(
SNodeList
*
pParameterList
)
{
if
(
1
==
LIST_LENGTH
(
pParameterList
))
{
return
isStar
(
nodesListGetNode
(
pParameterList
,
0
))
?
2
:
1
;
}
return
LIST_LENGTH
(
pParameterList
);
}
static
void
setFuncClassification
(
SNode
*
pCurrStmt
,
SFunctionNode
*
pFunc
)
{
if
(
NULL
!=
pCurrStmt
&&
QUERY_NODE_SELECT_STMT
==
nodeType
(
pCurrStmt
))
{
SSelectStmt
*
pSelect
=
(
SSelectStmt
*
)
pCurrStmt
;
...
...
@@ -1229,7 +1237,9 @@ static void setFuncClassification(SNode* pCurrStmt, SFunctionNode* pFunc) {
pSelect
->
hasMultiRowsFunc
=
pSelect
->
hasMultiRowsFunc
?
true
:
fmIsMultiRowsFunc
(
pFunc
->
funcId
);
if
(
fmIsSelectFunc
(
pFunc
->
funcId
))
{
pSelect
->
hasSelectFunc
=
true
;
++
(
pSelect
->
selectFuncNum
);
pSelect
->
selectFuncNum
+=
(
fmIsMultiResFunc
(
pFunc
->
funcId
)
&&
!
fmIsLastRowFunc
(
pFunc
->
funcId
))
?
getMultiResFuncNum
(
pFunc
->
pParameterList
)
:
1
;
}
else
if
(
fmIsVectorFunc
(
pFunc
->
funcId
))
{
pSelect
->
hasOtherVectorFunc
=
true
;
}
...
...
@@ -2134,6 +2144,15 @@ static int32_t translateOrderBy(STranslateContext* pCxt, SSelectStmt* pSelect) {
return
code
;
}
static
int32_t
translateFillValues
(
STranslateContext
*
pCxt
,
SSelectStmt
*
pSelect
)
{
if
(
NULL
==
pSelect
->
pWindow
||
QUERY_NODE_INTERVAL_WINDOW
!=
nodeType
(
pSelect
->
pWindow
)
||
NULL
==
((
SIntervalWindowNode
*
)
pSelect
->
pWindow
)
->
pFill
)
{
return
TSDB_CODE_SUCCESS
;
}
SFillNode
*
pFill
=
(
SFillNode
*
)((
SIntervalWindowNode
*
)
pSelect
->
pWindow
)
->
pFill
;
return
TSDB_CODE_SUCCESS
;
}
static
int32_t
translateSelectList
(
STranslateContext
*
pCxt
,
SSelectStmt
*
pSelect
)
{
pCxt
->
currClause
=
SQL_CLAUSE_SELECT
;
int32_t
code
=
translateExprList
(
pCxt
,
pSelect
->
pProjectionList
);
...
...
@@ -2143,6 +2162,9 @@ static int32_t translateSelectList(STranslateContext* pCxt, SSelectStmt* pSelect
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
checkExprListForGroupBy
(
pCxt
,
pSelect
,
pSelect
->
pProjectionList
);
}
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
translateFillValues
(
pCxt
,
pSelect
);
}
return
code
;
}
...
...
@@ -6053,7 +6075,7 @@ static int32_t buildUpdateTagValReq(STranslateContext* pCxt, SAlterTableStmt* pS
pReq
->
pTagVal
=
(
uint8_t
*
)
pTag
;
pStmt
->
pVal
->
datum
.
p
=
(
char
*
)
pTag
;
// for free
}
else
{
pReq
->
isNull
=
(
TSDB_DATA_TYPE_NULL
==
pStmt
->
pVal
->
node
.
resType
.
type
)
;
pReq
->
isNull
=
pStmt
->
pVal
->
isNull
;
pReq
->
nTagVal
=
pStmt
->
pVal
->
node
.
resType
.
bytes
;
pReq
->
pTagVal
=
nodesGetValueFromNode
(
pStmt
->
pVal
);
...
...
source/libs/planner/src/planLogicCreater.c
浏览文件 @
8a7d8147
...
...
@@ -713,7 +713,7 @@ static int32_t createWindowLogicNodeByInterval(SLogicPlanContext* pCxt, SInterva
(
NULL
!=
pInterval
->
pSliding
?
((
SValueNode
*
)
pInterval
->
pSliding
)
->
unit
:
pWindow
->
intervalUnit
);
pWindow
->
windowAlgo
=
pCxt
->
pPlanCxt
->
streamQuery
?
INTERVAL_ALGO_STREAM_SINGLE
:
INTERVAL_ALGO_HASH
;
pWindow
->
node
.
groupAction
=
GROUP_ACTION_KEEP
;
pWindow
->
node
.
requireDataOrder
=
DATA_ORDER_LEVEL_IN_BLOCK
;
pWindow
->
node
.
requireDataOrder
=
pSelect
->
hasTimeLineFunc
?
DATA_ORDER_LEVEL_IN_GROUP
:
DATA_ORDER_LEVEL_IN_BLOCK
;
pWindow
->
node
.
resultDataOrder
=
DATA_ORDER_LEVEL_IN_GROUP
;
pWindow
->
pTspk
=
nodesCloneNode
(
pInterval
->
pCol
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录