[TD-5833]<fix> fix 1 column error when create table use select _c0 from..
This commit is contained in:
parent
4af2ab3d1d
commit
8da778c505
|
@ -7557,6 +7557,7 @@ int32_t doCheckForStream(SSqlObj* pSql, SSqlInfo* pInfo) {
|
|||
const char* msg7 = "time interval is required";
|
||||
const char* msg8 = "the first column should be primary timestamp column";
|
||||
const char* msg9 = "Continuous query do not support sub query";
|
||||
const char* msg10 = "illegal number of columns";
|
||||
|
||||
SSqlCmd* pCmd = &pSql->cmd;
|
||||
SQueryInfo* pQueryInfo = tscGetQueryInfo(pCmd);
|
||||
|
@ -7598,6 +7599,10 @@ int32_t doCheckForStream(SSqlObj* pSql, SSqlInfo* pInfo) {
|
|||
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) {
|
||||
return TSDB_CODE_TSC_INVALID_OPERATION;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue