restore, fix build error
This commit is contained in:
parent
f8c13734d6
commit
c9adad624d
|
@ -6732,9 +6732,20 @@ int32_t doCheckForStream(SSqlObj* pSql, SSqlInfo* pInfo) {
|
||||||
return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg2);
|
return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// project query primary column must be timestamp type
|
||||||
if (tscIsProjectionQuery(pQueryInfo)) {
|
if (tscIsProjectionQuery(pQueryInfo)) {
|
||||||
SExprInfo* pExpr = tscExprGet(pQueryInfo, 0);
|
size_t size = tscSqlExprNumOfExprs(pQueryInfo);
|
||||||
if (pExpr->base.colInfo.colId != PRIMARYKEY_TIMESTAMP_COL_INDEX) {
|
// check zero
|
||||||
|
if(size == 0) {
|
||||||
|
return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg8);
|
||||||
|
}
|
||||||
|
|
||||||
|
// check primary column is timestamp
|
||||||
|
SSqlExpr* pSqlExpr = tscSqlExprGet(pQueryInfo, 0);
|
||||||
|
if(pSqlExpr == NULL) {
|
||||||
|
return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg8);
|
||||||
|
}
|
||||||
|
if( pSqlExpr->colInfo.colId != PRIMARYKEY_TIMESTAMP_COL_INDEX) {
|
||||||
return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg8);
|
return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg8);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue