fix: fix error message
This commit is contained in:
parent
88c13e17c3
commit
c9c7f99764
|
@ -2934,14 +2934,14 @@ static int32_t createMultiResFuncsFromStar(STranslateContext* pCxt, SFunctionNod
|
||||||
static int32_t createTags(STranslateContext* pCxt, SNodeList** pOutput) {
|
static int32_t createTags(STranslateContext* pCxt, SNodeList** pOutput) {
|
||||||
if (QUERY_NODE_REAL_TABLE != nodeType(((SSelectStmt*)pCxt->pCurrStmt)->pFromTable)) {
|
if (QUERY_NODE_REAL_TABLE != nodeType(((SSelectStmt*)pCxt->pCurrStmt)->pFromTable)) {
|
||||||
return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_TAGS_PC,
|
return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_TAGS_PC,
|
||||||
"The _TAGS pseudo column can only be used for subtable and supertable queries");
|
"The _TAGS pseudo column can only be used for child table and super table queries");
|
||||||
}
|
}
|
||||||
|
|
||||||
SRealTableNode* pTable = (SRealTableNode*)(((SSelectStmt*)pCxt->pCurrStmt)->pFromTable);
|
SRealTableNode* pTable = (SRealTableNode*)(((SSelectStmt*)pCxt->pCurrStmt)->pFromTable);
|
||||||
const STableMeta* pMeta = pTable->pMeta;
|
const STableMeta* pMeta = pTable->pMeta;
|
||||||
if (TSDB_SUPER_TABLE != pMeta->tableType && TSDB_CHILD_TABLE != pMeta->tableType) {
|
if (TSDB_SUPER_TABLE != pMeta->tableType && TSDB_CHILD_TABLE != pMeta->tableType) {
|
||||||
return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_TAGS_PC,
|
return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_TAGS_PC,
|
||||||
"The _TAGS pseudo column can only be used for subtable and supertable queries");
|
"The _TAGS pseudo column can only be used for child table and super table queries");
|
||||||
}
|
}
|
||||||
|
|
||||||
SSchema* pTagsSchema = getTableTagSchema(pMeta);
|
SSchema* pTagsSchema = getTableTagSchema(pMeta);
|
||||||
|
|
|
@ -164,6 +164,8 @@ static char* getSyntaxErrFormat(int32_t errCode) {
|
||||||
return "%s function is not supported in fill query";
|
return "%s function is not supported in fill query";
|
||||||
case TSDB_CODE_PAR_INVALID_WINDOW_PC:
|
case TSDB_CODE_PAR_INVALID_WINDOW_PC:
|
||||||
return "_WSTART, _WEND and _WDURATION can only be used in window query";
|
return "_WSTART, _WEND and _WDURATION can only be used in window query";
|
||||||
|
case TSDB_CODE_PAR_INVALID_TAGS_PC:
|
||||||
|
return "Tags can only applied to super table and child table";
|
||||||
case TSDB_CODE_PAR_WINDOW_NOT_ALLOWED_FUNC:
|
case TSDB_CODE_PAR_WINDOW_NOT_ALLOWED_FUNC:
|
||||||
return "%s function is not supported in time window query";
|
return "%s function is not supported in time window query";
|
||||||
case TSDB_CODE_PAR_STREAM_NOT_ALLOWED_FUNC:
|
case TSDB_CODE_PAR_STREAM_NOT_ALLOWED_FUNC:
|
||||||
|
|
Loading…
Reference in New Issue