commit
c196808306
|
@ -13,8 +13,8 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef TDENGINE_TSCSECONARYMERGE_H
|
||||
#define TDENGINE_TSCSECONARYMERGE_H
|
||||
#ifndef TDENGINE_TSCLOCALMERGE_H
|
||||
#define TDENGINE_TSCLOCALMERGE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -27,14 +27,7 @@ extern "C" {
|
|||
#include "tsclient.h"
|
||||
|
||||
#define MAX_NUM_OF_SUBQUERY_RETRY 3
|
||||
|
||||
/*
|
||||
* @version 0.1
|
||||
* @date 2018/01/05
|
||||
* @author liaohj
|
||||
* management of client-side reducer for metric query
|
||||
*/
|
||||
|
||||
|
||||
struct SQLFunctionCtx;
|
||||
|
||||
typedef struct SLocalDataSource {
|
||||
|
@ -60,7 +53,6 @@ typedef struct SLocalReducer {
|
|||
char * prevRowOfInput;
|
||||
tFilePage * pResultBuf;
|
||||
int32_t nResultBufSize;
|
||||
// char * pBufForInterpo; // intermediate buffer for interpolation
|
||||
tFilePage * pTempBuffer;
|
||||
struct SQLFunctionCtx *pCtx;
|
||||
int32_t rowSize; // size of each intermediate result.
|
||||
|
@ -81,13 +73,8 @@ typedef struct SLocalReducer {
|
|||
} SLocalReducer;
|
||||
|
||||
typedef struct SSubqueryState {
|
||||
/*
|
||||
* the number of completed retrieval subquery, once this value equals to numOfVnodes,
|
||||
* all retrieval are completed.Local merge is launched.
|
||||
*/
|
||||
int32_t numOfCompleted;
|
||||
int32_t numOfTotal; // number of total sub-queries
|
||||
int32_t code; // code from subqueries
|
||||
int32_t numOfRemain; // the number of remain unfinished subquery
|
||||
int32_t numOfTotal; // the number of total sub-queries
|
||||
uint64_t numOfRetrievedRows; // total number of points in this query
|
||||
} SSubqueryState;
|
||||
|
||||
|
@ -128,4 +115,4 @@ int32_t tscDoLocalMerge(SSqlObj *pSql);
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif // TDENGINE_TSCSECONARYMERGE_H
|
||||
#endif // TDENGINE_TSCLOCALMERGE_H
|
||||
|
|
|
@ -26,11 +26,9 @@ extern "C" {
|
|||
void tscFetchDatablockFromSubquery(SSqlObj* pSql);
|
||||
|
||||
void tscSetupOutputColumnIndex(SSqlObj* pSql);
|
||||
int32_t tscLaunchSecondPhaseSubqueries(SSqlObj* pSql);
|
||||
void tscJoinQueryCallback(void* param, TAOS_RES* tres, int code);
|
||||
|
||||
SJoinSupporter* tscCreateJoinSupporter(SSqlObj* pSql, SSubqueryState* pState, int32_t index);
|
||||
void tscDestroyJoinSupporter(SJoinSupporter* pSupporter);
|
||||
|
||||
int32_t tscHandleMasterJoinQuery(SSqlObj* pSql);
|
||||
|
||||
|
|
|
@ -64,7 +64,8 @@ typedef struct SJoinSupporter {
|
|||
SSubqueryState* pState;
|
||||
SSqlObj* pObj; // parent SqlObj
|
||||
int32_t subqueryIndex; // index of sub query
|
||||
int64_t interval; // interval time
|
||||
int64_t intervalTime; // interval time
|
||||
int64_t slidingTime; // sliding time
|
||||
SLimitVal limit; // limit info
|
||||
uint64_t uid; // query meter uid
|
||||
SArray* colList; // previous query information, no need to use this attribute, and the corresponding attribution
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1216,7 +1216,6 @@ static int32_t tableApplyFunctionsOnBlock(SQueryRuntimeEnv *pRuntimeEnv, SDataBl
|
|||
|
||||
// interval query with limit applied
|
||||
int32_t numOfRes = 0;
|
||||
|
||||
if (isIntervalQuery(pQuery)) {
|
||||
numOfRes = doCheckQueryCompleted(pRuntimeEnv, lastKey, pWindowResInfo);
|
||||
} else {
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
|
||||
#include <stdint.h>
|
||||
#include <pthread.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
|
|
@ -114,46 +114,46 @@ sql drop table tb
|
|||
sql drop table mt
|
||||
|
||||
sleep 3000
|
||||
## ALTER TABLE WHILE STREAMING [TBASE271]
|
||||
sql create table tb1 (ts timestamp, c1 int, c2 nchar(5), c3 int)
|
||||
sql create table strm as select count(*), avg(c1), first(c2), sum(c3) from tb1 interval(2s)
|
||||
sql select * from strm
|
||||
if $rows != 0 then
|
||||
return -1
|
||||
endi
|
||||
#sleep 12000
|
||||
sql insert into tb1 values (now, 1, 'taos', 1)
|
||||
sleep 20000
|
||||
sql select * from strm
|
||||
print rows = $rows
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
if $data04 != 1 then
|
||||
return -1
|
||||
endi
|
||||
sql alter table tb1 drop column c3
|
||||
sleep 6000
|
||||
sql insert into tb1 values (now, 2, 'taos')
|
||||
sleep 30000
|
||||
sql select * from strm
|
||||
if $rows != 2 then
|
||||
return -1
|
||||
endi
|
||||
if $data04 != 1 then
|
||||
return -1
|
||||
endi
|
||||
sql alter table tb1 add column c3 int
|
||||
sleep 6000
|
||||
sql insert into tb1 values (now, 3, 'taos', 3);
|
||||
sleep 3000
|
||||
sql select * from strm
|
||||
if $rows != 3 then
|
||||
return -1
|
||||
endi
|
||||
if $data04 != 1 then
|
||||
return -1
|
||||
endi
|
||||
### ALTER TABLE WHILE STREAMING [TBASE271]
|
||||
#sql create table tb1 (ts timestamp, c1 int, c2 nchar(5), c3 int)
|
||||
#sql create table strm as select count(*), avg(c1), first(c2), sum(c3) from tb1 interval(2s)
|
||||
#sql select * from strm
|
||||
#if $rows != 0 then
|
||||
# return -1
|
||||
#endi
|
||||
##sleep 12000
|
||||
#sql insert into tb1 values (now, 1, 'taos', 1)
|
||||
#sleep 20000
|
||||
#sql select * from strm
|
||||
#print rows = $rows
|
||||
#if $rows != 1 then
|
||||
# return -1
|
||||
#endi
|
||||
#if $data04 != 1 then
|
||||
# return -1
|
||||
#endi
|
||||
#sql alter table tb1 drop column c3
|
||||
#sleep 6000
|
||||
#sql insert into tb1 values (now, 2, 'taos')
|
||||
#sleep 30000
|
||||
#sql select * from strm
|
||||
#if $rows != 2 then
|
||||
# return -1
|
||||
#endi
|
||||
#if $data04 != 1 then
|
||||
# return -1
|
||||
#endi
|
||||
#sql alter table tb1 add column c3 int
|
||||
#sleep 6000
|
||||
#sql insert into tb1 values (now, 3, 'taos', 3);
|
||||
#sleep 3000
|
||||
#sql select * from strm
|
||||
#if $rows != 3 then
|
||||
# return -1
|
||||
#endi
|
||||
#if $data04 != 1 then
|
||||
# return -1
|
||||
#endi
|
||||
|
||||
## ALTER TABLE AND INSERT BY COLUMNS
|
||||
sql create table mt (ts timestamp, c1 int, c2 int) tags(t1 int)
|
||||
|
|
|
@ -82,26 +82,22 @@ sleep 2000
|
|||
run general/parser/groupby.sim
|
||||
sleep 2000
|
||||
run general/parser/set_tag_vals.sim
|
||||
|
||||
sleep 2000
|
||||
run general/parser/slimit_alter_tags.sim # persistent failed
|
||||
|
||||
sleep 2000
|
||||
run general/parser/join.sim
|
||||
sleep 2000
|
||||
run general/parser/join_multivnode.sim
|
||||
|
||||
sleep 2000
|
||||
#run general/parser/repeatAlter.sim
|
||||
sleep 2000
|
||||
#run general/parser/repeatStream.sim
|
||||
|
||||
run general/parser/repeatAlter.sim
|
||||
sleep 2000
|
||||
run general/parser/binary_escapeCharacter.sim
|
||||
sleep 2000
|
||||
run general/parser/bug.sim
|
||||
|
||||
sleep 2000
|
||||
run general/parser/stream_on_sys.sim
|
||||
sleep 2000
|
||||
run general/parser/stream.sim
|
||||
#sleep 2000
|
||||
#run general/parser/repeatStream.sim
|
||||
#sleep 2000
|
||||
#run general/parser/stream_on_sys.sim
|
||||
#sleep 2000
|
||||
#run general/parser/stream.sim
|
|
@ -324,7 +324,7 @@ cd ../../../debug; make
|
|||
./test.sh -f unique/vnode/replica3_vgroup.sim
|
||||
|
||||
./test.sh -f unique/arbitrator/check_cluster_cfg_para.sim
|
||||
./test.sh -f unique/arbitrator/dn2_mn1_cache_file_sync.sim
|
||||
./test.sh -f unique/arbitrator/dn2_mn1_cache_file_sync.sim
|
||||
./test.sh -f unique/arbitrator/dn3_mn1_full_createTableFail.sim
|
||||
./test.sh -f unique/arbitrator/dn3_mn1_full_dropDnodeFail.sim
|
||||
./test.sh -f unique/arbitrator/dn3_mn1_multiCreateDropTable.sim
|
||||
|
|
Loading…
Reference in New Issue