Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
e79d63d7
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e79d63d7
编写于
6月 14, 2023
作者:
G
Ganlin Zhao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add error code
上级
728e42f7
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
23 addition
and
3 deletion
+23
-3
include/libs/function/functionMgt.h
include/libs/function/functionMgt.h
+1
-1
include/util/taoserror.h
include/util/taoserror.h
+1
-0
source/libs/parser/src/parTranslater.c
source/libs/parser/src/parTranslater.c
+17
-1
source/libs/parser/src/parUtil.c
source/libs/parser/src/parUtil.c
+2
-0
source/util/src/terror.c
source/util/src/terror.c
+2
-1
未找到文件。
include/libs/function/functionMgt.h
浏览文件 @
e79d63d7
...
@@ -216,7 +216,7 @@ bool fmIsUserDefinedFunc(int32_t funcId);
...
@@ -216,7 +216,7 @@ bool fmIsUserDefinedFunc(int32_t funcId);
bool
fmIsDistExecFunc
(
int32_t
funcId
);
bool
fmIsDistExecFunc
(
int32_t
funcId
);
bool
fmIsForbidFillFunc
(
int32_t
funcId
);
bool
fmIsForbidFillFunc
(
int32_t
funcId
);
bool
fmIsForbidStreamFunc
(
int32_t
funcId
);
bool
fmIsForbidStreamFunc
(
int32_t
funcId
);
bool
fmIsForbidS
uper
TableFunc
(
int32_t
funcId
);
bool
fmIsForbidS
ys
TableFunc
(
int32_t
funcId
);
bool
fmIsIntervalInterpoFunc
(
int32_t
funcId
);
bool
fmIsIntervalInterpoFunc
(
int32_t
funcId
);
bool
fmIsInterpFunc
(
int32_t
funcId
);
bool
fmIsInterpFunc
(
int32_t
funcId
);
bool
fmIsLastRowFunc
(
int32_t
funcId
);
bool
fmIsLastRowFunc
(
int32_t
funcId
);
...
...
include/util/taoserror.h
浏览文件 @
e79d63d7
...
@@ -704,6 +704,7 @@ int32_t* taosGetErrno();
...
@@ -704,6 +704,7 @@ int32_t* taosGetErrno();
#define TSDB_CODE_PAR_INVALID_TAGS_PC TAOS_DEF_ERROR_CODE(0, 0x2665)
#define TSDB_CODE_PAR_INVALID_TAGS_PC TAOS_DEF_ERROR_CODE(0, 0x2665)
#define TSDB_CODE_PAR_INVALID_TIMELINE_QUERY TAOS_DEF_ERROR_CODE(0, 0x2666)
#define TSDB_CODE_PAR_INVALID_TIMELINE_QUERY TAOS_DEF_ERROR_CODE(0, 0x2666)
#define TSDB_CODE_PAR_INVALID_OPTR_USAGE TAOS_DEF_ERROR_CODE(0, 0x2667)
#define TSDB_CODE_PAR_INVALID_OPTR_USAGE TAOS_DEF_ERROR_CODE(0, 0x2667)
#define TSDB_CODE_PAR_SYSTABLE_NOT_ALLOWED_FUNC TAOS_DEF_ERROR_CODE(0, 0x2668)
#define TSDB_CODE_PAR_INTERNAL_ERROR TAOS_DEF_ERROR_CODE(0, 0x26FF)
#define TSDB_CODE_PAR_INTERNAL_ERROR TAOS_DEF_ERROR_CODE(0, 0x26FF)
//planner
//planner
...
...
source/libs/parser/src/parTranslater.c
浏览文件 @
e79d63d7
...
@@ -1660,6 +1660,19 @@ static int32_t translateForbidStreamFunc(STranslateContext* pCxt, SFunctionNode*
...
@@ -1660,6 +1660,19 @@ static int32_t translateForbidStreamFunc(STranslateContext* pCxt, SFunctionNode*
return
TSDB_CODE_SUCCESS
;
return
TSDB_CODE_SUCCESS
;
}
}
static
int32_t
translateForbidSysTableFunc
(
STranslateContext
*
pCxt
,
SFunctionNode
*
pFunc
)
{
if
(
!
fmIsForbidSysTableFunc
(
pFunc
->
funcId
))
{
return
TSDB_CODE_SUCCESS
;
}
SSelectStmt
*
pSelect
=
(
SSelectStmt
*
)
pCxt
->
pCurrStmt
;
SRealTableNode
*
pTable
=
(
SRealTableNode
*
)
pSelect
->
pFromTable
;
if
(
TSDB_SYSTEM_TABLE
==
pTable
->
pMeta
->
tableType
)
{
return
generateSyntaxErrMsg
(
&
pCxt
->
msgBuf
,
TSDB_CODE_PAR_SYSTABLE_NOT_ALLOWED_FUNC
,
pFunc
->
functionName
);
}
return
TSDB_CODE_SUCCESS
;
}
static
int32_t
translateRepeatScanFunc
(
STranslateContext
*
pCxt
,
SFunctionNode
*
pFunc
)
{
static
int32_t
translateRepeatScanFunc
(
STranslateContext
*
pCxt
,
SFunctionNode
*
pFunc
)
{
if
(
!
fmIsRepeatScanFunc
(
pFunc
->
funcId
))
{
if
(
!
fmIsRepeatScanFunc
(
pFunc
->
funcId
))
{
return
TSDB_CODE_SUCCESS
;
return
TSDB_CODE_SUCCESS
;
...
@@ -1891,6 +1904,9 @@ static int32_t translateNormalFunction(STranslateContext* pCxt, SFunctionNode* p
...
@@ -1891,6 +1904,9 @@ static int32_t translateNormalFunction(STranslateContext* pCxt, SFunctionNode* p
if
(
TSDB_CODE_SUCCESS
==
code
)
{
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
translateForbidStreamFunc
(
pCxt
,
pFunc
);
code
=
translateForbidStreamFunc
(
pCxt
,
pFunc
);
}
}
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
translateForbidSysTableFunc
(
pCxt
,
pFunc
);
}
if
(
TSDB_CODE_SUCCESS
==
code
)
{
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
translateRepeatScanFunc
(
pCxt
,
pFunc
);
code
=
translateRepeatScanFunc
(
pCxt
,
pFunc
);
}
}
...
@@ -2648,7 +2664,7 @@ static int32_t replaceTbName(STranslateContext* pCxt, SSelectStmt* pSelect) {
...
@@ -2648,7 +2664,7 @@ static int32_t replaceTbName(STranslateContext* pCxt, SSelectStmt* pSelect) {
SNode
**
pNode
=
NULL
;
SNode
**
pNode
=
NULL
;
SRewriteTbNameContext
pRewriteCxt
=
{
0
};
SRewriteTbNameContext
pRewriteCxt
=
{
0
};
pRewriteCxt
.
pTbName
=
pTable
->
table
.
tableName
;
pRewriteCxt
.
pTbName
=
pTable
->
table
.
tableName
;
nodesRewriteExprPostOrder
(
&
pSelect
->
pWhere
,
doTranslateTbName
,
&
pRewriteCxt
);
nodesRewriteExprPostOrder
(
&
pSelect
->
pWhere
,
doTranslateTbName
,
&
pRewriteCxt
);
return
pRewriteCxt
.
errCode
;
return
pRewriteCxt
.
errCode
;
...
...
source/libs/parser/src/parUtil.c
浏览文件 @
e79d63d7
...
@@ -170,6 +170,8 @@ static char* getSyntaxErrFormat(int32_t errCode) {
...
@@ -170,6 +170,8 @@ static char* getSyntaxErrFormat(int32_t errCode) {
return
"%s function is not supported in stream query"
;
return
"%s function is not supported in stream query"
;
case
TSDB_CODE_PAR_GROUP_BY_NOT_ALLOWED_FUNC
:
case
TSDB_CODE_PAR_GROUP_BY_NOT_ALLOWED_FUNC
:
return
"%s function is not supported in group query"
;
return
"%s function is not supported in group query"
;
case
TSDB_CODE_PAR_SYSTABLE_NOT_ALLOWED_FUNC
:
return
"%s function is not supported in system table query"
;
case
TSDB_CODE_PAR_INVALID_INTERP_CLAUSE
:
case
TSDB_CODE_PAR_INVALID_INTERP_CLAUSE
:
return
"Invalid usage of RANGE clause, EVERY clause or FILL clause"
;
return
"Invalid usage of RANGE clause, EVERY clause or FILL clause"
;
case
TSDB_CODE_PAR_NO_VALID_FUNC_IN_WIN
:
case
TSDB_CODE_PAR_NO_VALID_FUNC_IN_WIN
:
...
...
source/util/src/terror.c
浏览文件 @
e79d63d7
...
@@ -554,7 +554,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INVALID_COL_JSON, "Only tag can be jso
...
@@ -554,7 +554,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INVALID_COL_JSON, "Only tag can be jso
TAOS_DEFINE_ERROR
(
TSDB_CODE_PAR_VALUE_TOO_LONG
,
"Value too long for column/tag"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_PAR_VALUE_TOO_LONG
,
"Value too long for column/tag"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_PAR_INVALID_DELETE_WHERE
,
"The DELETE statement must have a definite time window range"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_PAR_INVALID_DELETE_WHERE
,
"The DELETE statement must have a definite time window range"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_PAR_INVALID_REDISTRIBUTE_VG
,
"The REDISTRIBUTE VGROUP statement only support 1 to 3 dnodes"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_PAR_INVALID_REDISTRIBUTE_VG
,
"The REDISTRIBUTE VGROUP statement only support 1 to 3 dnodes"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_PAR_FILL_NOT_ALLOWED_FUNC
,
"Fill no
w
allowed"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_PAR_FILL_NOT_ALLOWED_FUNC
,
"Fill no
t
allowed"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_PAR_INVALID_WINDOW_PC
,
"Invalid windows pc"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_PAR_INVALID_WINDOW_PC
,
"Invalid windows pc"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_PAR_WINDOW_NOT_ALLOWED_FUNC
,
"Window not allowed"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_PAR_WINDOW_NOT_ALLOWED_FUNC
,
"Window not allowed"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_PAR_STREAM_NOT_ALLOWED_FUNC
,
"Stream not allowed"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_PAR_STREAM_NOT_ALLOWED_FUNC
,
"Stream not allowed"
)
...
@@ -566,6 +566,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INVALID_SMA_INDEX, "Invalid sma index")
...
@@ -566,6 +566,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INVALID_SMA_INDEX, "Invalid sma index")
TAOS_DEFINE_ERROR
(
TSDB_CODE_PAR_INVALID_SELECTED_EXPR
,
"Invalid SELECTed expression"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_PAR_INVALID_SELECTED_EXPR
,
"Invalid SELECTed expression"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_PAR_GET_META_ERROR
,
"Fail to get table info"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_PAR_GET_META_ERROR
,
"Fail to get table info"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_PAR_NOT_UNIQUE_TABLE_ALIAS
,
"Not unique table/alias"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_PAR_NOT_UNIQUE_TABLE_ALIAS
,
"Not unique table/alias"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_PAR_SYSTABLE_NOT_ALLOWED_FUNC
,
"System table not allowed"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_PAR_INTERNAL_ERROR
,
"Parser internal error"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_PAR_INTERNAL_ERROR
,
"Parser internal error"
)
//planner
//planner
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录