提交 bc7ffbbb 编写于 作者: wmmhello's avatar wmmhello

[TD-5833]<fix> fix 1 column error when create table use select _c0 from..

上级 8da778c5
...@@ -7599,10 +7599,6 @@ int32_t doCheckForStream(SSqlObj* pSql, SSqlInfo* pInfo) { ...@@ -7599,10 +7599,6 @@ int32_t doCheckForStream(SSqlObj* pSql, SSqlInfo* pInfo) {
return code; return code;
} }
if (taosArrayGetSize(pSqlNode->pSelNodeList) <= 1) {
return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg10);
}
if (validateSelectNodeList(&pSql->cmd, pQueryInfo, pSqlNode->pSelNodeList, false, false, false) != TSDB_CODE_SUCCESS) { if (validateSelectNodeList(&pSql->cmd, pQueryInfo, pSqlNode->pSelNodeList, false, false, false) != TSDB_CODE_SUCCESS) {
return TSDB_CODE_TSC_INVALID_OPERATION; return TSDB_CODE_TSC_INVALID_OPERATION;
} }
...@@ -7648,7 +7644,9 @@ int32_t doCheckForStream(SSqlObj* pSql, SSqlInfo* pInfo) { ...@@ -7648,7 +7644,9 @@ int32_t doCheckForStream(SSqlObj* pSql, SSqlInfo* pInfo) {
return TSDB_CODE_TSC_INVALID_OPERATION; return TSDB_CODE_TSC_INVALID_OPERATION;
} }
pCmd->numOfCols = pQueryInfo->fieldsInfo.numOfOutput; if (pQueryInfo->fieldsInfo.numOfOutput <= 1) {
return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg10);
}
if (validateSqlFunctionInStreamSql(pCmd, pQueryInfo) != TSDB_CODE_SUCCESS) { if (validateSqlFunctionInStreamSql(pCmd, pQueryInfo) != TSDB_CODE_SUCCESS) {
return TSDB_CODE_TSC_INVALID_OPERATION; return TSDB_CODE_TSC_INVALID_OPERATION;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册