commit
38558450ba
|
@ -1203,16 +1203,20 @@ bool tsBufNextPos(STSBuf* pTSBuf) {
|
||||||
if (pCur->vnodeIndex == -1) {
|
if (pCur->vnodeIndex == -1) {
|
||||||
if (pCur->order == TSQL_SO_ASC) {
|
if (pCur->order == TSQL_SO_ASC) {
|
||||||
tsBufGetBlock(pTSBuf, 0, 0);
|
tsBufGetBlock(pTSBuf, 0, 0);
|
||||||
// list is empty
|
|
||||||
if (pTSBuf->block.numOfElem == 0) {
|
if (pTSBuf->block.numOfElem == 0) { // the whole list is empty, return
|
||||||
tsBufResetPos(pTSBuf);
|
tsBufResetPos(pTSBuf);
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
|
} else { // get the last timestamp record in the last block of the last vnode
|
||||||
|
assert(pTSBuf->numOfVnodes > 0);
|
||||||
|
|
||||||
int32_t vnodeIndex = pTSBuf->numOfVnodes - 1;
|
int32_t vnodeIndex = pTSBuf->numOfVnodes - 1;
|
||||||
|
pCur->vnodeIndex = vnodeIndex;
|
||||||
|
|
||||||
int32_t vnodeId = pTSBuf->pData[pCur->vnodeIndex].info.vnode;
|
int32_t vnodeId = pTSBuf->pData[pCur->vnodeIndex].info.vnode;
|
||||||
STSVnodeBlockInfo* pBlockInfo = tsBufGetVnodeBlockInfo(pTSBuf, vnodeId);
|
STSVnodeBlockInfo* pBlockInfo = tsBufGetVnodeBlockInfo(pTSBuf, vnodeId);
|
||||||
int32_t blockIndex = pBlockInfo->numOfBlocks - 1;
|
int32_t blockIndex = pBlockInfo->numOfBlocks - 1;
|
||||||
|
|
|
@ -155,7 +155,8 @@ int32_t tsParseOneColumnData(SSchema *pSchema, SSQLToken *pToken, char *payload,
|
||||||
int64_t iv;
|
int64_t iv;
|
||||||
int32_t numType;
|
int32_t numType;
|
||||||
char * endptr = NULL;
|
char * endptr = NULL;
|
||||||
|
errno = 0; // clear the previous existed error information
|
||||||
|
|
||||||
switch (pSchema->type) {
|
switch (pSchema->type) {
|
||||||
case TSDB_DATA_TYPE_BOOL: { // bool
|
case TSDB_DATA_TYPE_BOOL: { // bool
|
||||||
if ((pToken->type == TK_BOOL || pToken->type == TK_STRING) && (pToken->n != 0)) {
|
if ((pToken->type == TK_BOOL || pToken->type == TK_STRING) && (pToken->n != 0)) {
|
||||||
|
|
|
@ -1395,7 +1395,7 @@ static int32_t doTSJoinFilter(SQueryRuntimeEnv *pRuntimeEnv, int32_t offset) {
|
||||||
|
|
||||||
TSKEY key = *(TSKEY *)(pCtx[0].aInputElemBuf + TSDB_KEYSIZE * offset);
|
TSKEY key = *(TSKEY *)(pCtx[0].aInputElemBuf + TSDB_KEYSIZE * offset);
|
||||||
|
|
||||||
#if 1
|
#if defined(_DEBUG_VIEW)
|
||||||
printf("elem in comp ts file:%lld, key:%lld, tag:%d, id:%s, query order:%d, ts order:%d, traverse:%d, index:%d\n",
|
printf("elem in comp ts file:%lld, key:%lld, tag:%d, id:%s, query order:%d, ts order:%d, traverse:%d, index:%d\n",
|
||||||
elem.ts, key, elem.tag, pRuntimeEnv->pMeterObj->meterId, pQuery->order.order, pRuntimeEnv->pTSBuf->tsOrder,
|
elem.ts, key, elem.tag, pRuntimeEnv->pMeterObj->meterId, pQuery->order.order, pRuntimeEnv->pTSBuf->tsOrder,
|
||||||
pRuntimeEnv->pTSBuf->cur.order, pRuntimeEnv->pTSBuf->cur.tsIndex);
|
pRuntimeEnv->pTSBuf->cur.order, pRuntimeEnv->pTSBuf->cur.tsIndex);
|
||||||
|
@ -2919,6 +2919,7 @@ static int file_order_comparator(const void *p1, const void *p2) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* open a data files and header file for metric meta query
|
* open a data files and header file for metric meta query
|
||||||
|
*
|
||||||
* @param pQInfo
|
* @param pQInfo
|
||||||
* @param pVnodeFiles
|
* @param pVnodeFiles
|
||||||
* @param fid
|
* @param fid
|
||||||
|
@ -2929,8 +2930,6 @@ static int file_order_comparator(const void *p1, const void *p2) {
|
||||||
*/
|
*/
|
||||||
static int32_t vnodeOpenVnodeDBFiles(SQInfo *pQInfo, SQueryFileInfo *pVnodeFiles, int32_t fid, int32_t vnodeId,
|
static int32_t vnodeOpenVnodeDBFiles(SQInfo *pQInfo, SQueryFileInfo *pVnodeFiles, int32_t fid, int32_t vnodeId,
|
||||||
char *fileName, char *prefix) {
|
char *fileName, char *prefix) {
|
||||||
// __off_t size = 0;
|
|
||||||
|
|
||||||
pVnodeFiles->fileID = fid;
|
pVnodeFiles->fileID = fid;
|
||||||
pVnodeFiles->defaultMappingSize = DEFAULT_DATA_FILE_MMAP_WINDOW_SIZE;
|
pVnodeFiles->defaultMappingSize = DEFAULT_DATA_FILE_MMAP_WINDOW_SIZE;
|
||||||
|
|
||||||
|
|
|
@ -569,7 +569,6 @@ int vnodeProcessShellSubmitRequest(char *pMsg, int msgLen, SShellObj *pObj) {
|
||||||
int sversion = htonl(pBlocks->sversion);
|
int sversion = htonl(pBlocks->sversion);
|
||||||
|
|
||||||
if (pSubmit->import) {
|
if (pSubmit->import) {
|
||||||
dTrace("start to import data");
|
|
||||||
code = vnodeImportPoints(pMeterObj, (char *) &(pBlocks->numOfRows), subMsgLen, TSDB_DATA_SOURCE_SHELL, pObj,
|
code = vnodeImportPoints(pMeterObj, (char *) &(pBlocks->numOfRows), subMsgLen, TSDB_DATA_SOURCE_SHELL, pObj,
|
||||||
sversion, &numOfPoints, now);
|
sversion, &numOfPoints, now);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue