From 30a98ddcab35ab21579dc082a6ead89559e802d0 Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Thu, 13 Mar 2025 13:54:34 +0800 Subject: [PATCH] fix: add document error code description --- docs/en/14-reference/09-error-code.md | 4 ++-- docs/zh/14-reference/09-error-code.md | 4 ++-- include/util/taoserror.h | 3 +-- source/libs/planner/src/planOptimizer.c | 4 ---- source/libs/planner/src/planUtil.c | 2 -- source/util/src/terror.c | 1 - 6 files changed, 5 insertions(+), 13 deletions(-) diff --git a/docs/en/14-reference/09-error-code.md b/docs/en/14-reference/09-error-code.md index d071bcdc81..725f5a22f5 100644 --- a/docs/en/14-reference/09-error-code.md +++ b/docs/en/14-reference/09-error-code.md @@ -462,8 +462,8 @@ This document details the server error codes that may be encountered when using | 0x80002688 | Cannot use 'year' or 'month' as true_for duration | Use year or month as true_for_duration | Check and correct the SQL statement | | 0x80002689 | Invalid using cols function | Illegal using cols function | Check and correct the SQL statement | | 0x8000268A | Cols function's first param must be a select function that output a single row | The first parameter of the cols function should be a selection function | Check and correct the SQL statement | -| 0x8000268B | Invalid using cols function with multiple output columns | Illegal using the cols function for multiple column output | Check and correct the SQL statement | -| 0x8000268C | Invalid using alias for cols function | Illegal cols function alias | Check and correct the SQL statement | +| 0x8000268B | Invalid using alias for cols function | Illegal cols function alias | Check and correct the SQL statement | +| 0x8000268C | Join primary key col must be timestmap type | Join primary key data type error | Check and correct the SQL statement | | 0x800026FF | Parser internal error | Internal error in parser | Preserve the scene and logs, report issue on GitHub | | 0x80002700 | Planner internal error | Internal error in planner | Preserve the scene and logs, report issue on GitHub | | 0x80002701 | Expect ts equal | JOIN condition validation failed | Preserve the scene and logs, report issue on GitHub | diff --git a/docs/zh/14-reference/09-error-code.md b/docs/zh/14-reference/09-error-code.md index 353ce16ed4..87809022dd 100644 --- a/docs/zh/14-reference/09-error-code.md +++ b/docs/zh/14-reference/09-error-code.md @@ -479,8 +479,8 @@ description: TDengine 服务端的错误码列表和详细说明 | 0x80002688 | Cannot use 'year' or 'month' as true_for duration | 不能使用 n(月), y(年) 作为 true_for 的时间单位 | 检查并修正 SQL 语句 | | 0x80002689 | Invalid using cols function | cols 函数使用错误 | 检查并修正 SQL 语句 | | 0x8000268A | Cols function's first param must be a select function that output a single row | cols 函数第一个参数应该为选择函数 | 检查并修正 SQL 语句 | -| 0x8000268B | Invalid using cols function with multiple output columns | 多列输出的 cols 函数使用错误 | 检查并修正 SQL 语句 | -| 0x8000268C | Invalid using alias for cols function | cols 函数输出列重命名错误 | 检查并修正 SQL 语句 | +| 0x8000268B | Invalid using alias for cols function | cols 函数输出列重命名错误 | 检查并修正 SQL 语句 | +| 0x8000268C | Join primary key col must be timestmap type | 关联查询主键列等值条件类型错误 | 检查并修正 SQL 语句 | | 0x800026FF | Parser internal error | 解析器内部错误 | 保留现场和日志,github上报issue | | 0x80002700 | Planner internal error | 计划期内部错误 | 保留现场和日志,github上报issue | | 0x80002701 | Expect ts equal | JOIN 条件校验失败 | 保留现场和日志,github上报issue | diff --git a/include/util/taoserror.h b/include/util/taoserror.h index a9fbc79550..66031f284a 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -914,8 +914,7 @@ int32_t taosGetErrSize(); #define TSDB_CODE_PAR_INVALID_COLS_FUNCTION TAOS_DEF_ERROR_CODE(0, 0x2689) #define TSDB_CODE_PAR_INVALID_COLS_SELECTFUNC TAOS_DEF_ERROR_CODE(0, 0x268A) #define TSDB_CODE_PAR_INVALID_COLS_ALIAS TAOS_DEF_ERROR_CODE(0, 0x268B) -#define TSDB_CODE_PAR_VALID_TS_SERIOUS_REQUIRED TAOS_DEF_ERROR_CODE(0, 0x268C) -#define TSDB_CODE_PAR_PRIM_KEY_MUST_BE_TS TAOS_DEF_ERROR_CODE(0, 0x268D) +#define TSDB_CODE_PAR_PRIM_KEY_MUST_BE_TS TAOS_DEF_ERROR_CODE(0, 0x268C) #define TSDB_CODE_PAR_INTERNAL_ERROR TAOS_DEF_ERROR_CODE(0, 0x26FF) //planner diff --git a/source/libs/planner/src/planOptimizer.c b/source/libs/planner/src/planOptimizer.c index e48d4d0acb..63947017d2 100644 --- a/source/libs/planner/src/planOptimizer.c +++ b/source/libs/planner/src/planOptimizer.c @@ -1487,10 +1487,6 @@ static int32_t pdcJoinCheckAllCond(SOptimizeContext* pCxt, SJoinLogicNode* pJoin return generateUsageErrMsg(pCxt->pPlanCxt->pMsg, pCxt->pPlanCxt->msgLen, TSDB_CODE_PLAN_EXPECTED_TS_EQUAL); } - //if ((pJoin->leftNoOrderedSubQuery || pJoin->rightNoOrderedSubQuery) && !primCondGot) { - // return generateUsageErrMsg(pCxt->pPlanCxt->pMsg, pCxt->pPlanCxt->msgLen, TSDB_CODE_PAR_VALID_TS_SERIOUS_REQUIRED); - //} - if (IS_ASOF_JOIN(pJoin->subType)) { nodesDestroyNode(pJoin->addPrimEqCond); pJoin->addPrimEqCond = NULL; diff --git a/source/libs/planner/src/planUtil.c b/source/libs/planner/src/planUtil.c index 311116335e..a31b132cae 100644 --- a/source/libs/planner/src/planUtil.c +++ b/source/libs/planner/src/planUtil.c @@ -26,8 +26,6 @@ static char* getUsageErrFormat(int32_t errCode) { return "not support cross join"; case TSDB_CODE_PLAN_NOT_SUPPORT_JOIN_COND: return "Not supported join conditions"; - case TSDB_CODE_PAR_VALID_TS_SERIOUS_REQUIRED: - return "Valid time series required as input"; default: break; } diff --git a/source/util/src/terror.c b/source/util/src/terror.c index 8f2a2a8e72..84d2416af2 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -758,7 +758,6 @@ TAOS_DEFINE_ERROR(TSDB_CODE_PAR_TRUE_FOR_UNIT, "Cannot use 'year' o TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INVALID_COLS_FUNCTION, "Invalid cols function") TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INVALID_COLS_SELECTFUNC, "cols function's first param must be a select function that output a single row") TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INVALID_COLS_ALIAS, "Invalid using alias for cols function") -TAOS_DEFINE_ERROR(TSDB_CODE_PAR_VALID_TS_SERIOUS_REQUIRED, "Valid time series required as input") TAOS_DEFINE_ERROR(TSDB_CODE_PAR_PRIM_KEY_MUST_BE_TS, "Join primary key col must be timestmap type") TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INTERNAL_ERROR, "Parser internal error")