提交 24090f01 编写于 作者: H Haojun Liao

[td-10564] Fix compiler error.

上级 0671a3ff
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
#define TDENGINE_COMMON_H #define TDENGINE_COMMON_H
#include "taosdef.h" #include "taosdef.h"
#include "taosmsg.h"
#include "tarray.h"
//typedef struct STimeWindow { //typedef struct STimeWindow {
// TSKEY skey; // TSKEY skey;
......
...@@ -21,6 +21,7 @@ extern "C" { ...@@ -21,6 +21,7 @@ extern "C" {
#endif #endif
#include "common.h" #include "common.h"
#include "tvariant.h"
#define FUNCTION_SCALAR 1 #define FUNCTION_SCALAR 1
#define FUNCTION_AGG 2 #define FUNCTION_AGG 2
......
...@@ -93,7 +93,7 @@ typedef struct SFilePage { ...@@ -93,7 +93,7 @@ typedef struct SFilePage {
* @param handle * @param handle
* @return * @return
*/ */
int32_t createDiskbasedResultBuffer(SDiskbasedResultBuf** pResultBuf, int32_t pagesize, int32_t inMemBufSize, uint64_t qId); int32_t createDiskbasedResultBuffer(SDiskbasedResultBuf** pResultBuf, int32_t pagesize, int32_t inMemBufSize, uint64_t qId, const char* dir);
/** /**
* *
...@@ -118,7 +118,7 @@ SIDList getDataBufPagesIdList(SDiskbasedResultBuf* pResultBuf, int32_t groupId); ...@@ -118,7 +118,7 @@ SIDList getDataBufPagesIdList(SDiskbasedResultBuf* pResultBuf, int32_t groupId);
* @param id * @param id
* @return * @return
*/ */
tFilePage* getResBufPage(SDiskbasedResultBuf* pResultBuf, int32_t id); SFilePage* getResBufPage(SDiskbasedResultBuf* pResultBuf, int32_t id);
/** /**
* release the referenced buf pages * release the referenced buf pages
......
...@@ -73,7 +73,7 @@ enum { ...@@ -73,7 +73,7 @@ enum {
#define QUERY_IS_FREE_RESOURCE(type) (((type)&TSDB_QUERY_TYPE_FREE_RESOURCE) != 0) #define QUERY_IS_FREE_RESOURCE(type) (((type)&TSDB_QUERY_TYPE_FREE_RESOURCE) != 0)
typedef struct SArithmeticSupport { typedef struct SArithmeticSupport {
SExprInfo *pExprInfo; struct SExprInfo *pExprInfo;
int32_t numOfCols; int32_t numOfCols;
SColumnInfo *colList; SColumnInfo *colList;
void *exprList; // client side used void *exprList; // client side used
......
...@@ -20,8 +20,7 @@ ...@@ -20,8 +20,7 @@
extern "C" { extern "C" {
#endif #endif
#include "qExtbuffer.h" #include "tpagedfile.h"
#include "qResultbuf.h"
#include "ttszip.h" #include "ttszip.h"
typedef struct MinMaxEntry { typedef struct MinMaxEntry {
...@@ -40,7 +39,7 @@ typedef struct MinMaxEntry { ...@@ -40,7 +39,7 @@ typedef struct MinMaxEntry {
typedef struct { typedef struct {
int32_t size; int32_t size;
int32_t pageId; int32_t pageId;
tFilePage *data; SFilePage *data;
} SSlotInfo; } SSlotInfo;
typedef struct tMemBucketSlot { typedef struct tMemBucketSlot {
......
...@@ -37,7 +37,7 @@ typedef struct STSList { ...@@ -37,7 +37,7 @@ typedef struct STSList {
typedef struct STSElem { typedef struct STSElem {
TSKEY ts; TSKEY ts;
tVariant* tag; SVariant* tag;
int32_t id; int32_t id;
} STSElem; } STSElem;
...@@ -49,7 +49,7 @@ typedef struct STSCursor { ...@@ -49,7 +49,7 @@ typedef struct STSCursor {
} STSCursor; } STSCursor;
typedef struct STSBlock { typedef struct STSBlock {
tVariant tag; // tag value SVariant tag; // tag value
int32_t numOfElem; // number of elements int32_t numOfElem; // number of elements
int32_t compLen; // size after compressed int32_t compLen; // size after compressed
int32_t padding; // 0xFFFFFFFF by default, after the payload int32_t padding; // 0xFFFFFFFF by default, after the payload
...@@ -105,7 +105,7 @@ STSBuf* tsBufCreateFromCompBlocks(const char* pData, int32_t numOfBlocks, int32_ ...@@ -105,7 +105,7 @@ STSBuf* tsBufCreateFromCompBlocks(const char* pData, int32_t numOfBlocks, int32_
void* tsBufDestroy(STSBuf* pTSBuf); void* tsBufDestroy(STSBuf* pTSBuf);
void tsBufAppend(STSBuf* pTSBuf, int32_t id, tVariant* tag, const char* pData, int32_t len); void tsBufAppend(STSBuf* pTSBuf, int32_t id, SVariant* tag, const char* pData, int32_t len);
int32_t tsBufMerge(STSBuf* pDestBuf, const STSBuf* pSrcBuf); int32_t tsBufMerge(STSBuf* pDestBuf, const STSBuf* pSrcBuf);
STSBuf* tsBufClone(STSBuf* pTSBuf); STSBuf* tsBufClone(STSBuf* pTSBuf);
...@@ -117,7 +117,7 @@ void tsBufResetPos(STSBuf* pTSBuf); ...@@ -117,7 +117,7 @@ void tsBufResetPos(STSBuf* pTSBuf);
bool tsBufNextPos(STSBuf* pTSBuf); bool tsBufNextPos(STSBuf* pTSBuf);
STSElem tsBufGetElem(STSBuf* pTSBuf); STSElem tsBufGetElem(STSBuf* pTSBuf);
STSElem tsBufGetElemStartPos(STSBuf* pTSBuf, int32_t id, tVariant* tag); STSElem tsBufGetElemStartPos(STSBuf* pTSBuf, int32_t id, SVariant* tag);
STSCursor tsBufGetCursor(STSBuf* pTSBuf); STSCursor tsBufGetCursor(STSBuf* pTSBuf);
void tsBufSetTraverseOrder(STSBuf* pTSBuf, int32_t order); void tsBufSetTraverseOrder(STSBuf* pTSBuf, int32_t order);
...@@ -136,7 +136,7 @@ void tsBufGetGroupIdList(STSBuf* pTSBuf, int32_t* num, int32_t** id); ...@@ -136,7 +136,7 @@ void tsBufGetGroupIdList(STSBuf* pTSBuf, int32_t* num, int32_t** id);
int32_t dumpFileBlockByGroupId(STSBuf* pTSBuf, int32_t id, void* buf, int32_t* len, int32_t* numOfBlocks); int32_t dumpFileBlockByGroupId(STSBuf* pTSBuf, int32_t id, void* buf, int32_t* len, int32_t* numOfBlocks);
STSElem tsBufFindElemStartPosByTag(STSBuf* pTSBuf, tVariant* pTag); STSElem tsBufFindElemStartPosByTag(STSBuf* pTSBuf, SVariant* pTag);
bool tsBufIsValidElem(STSElem* pElem); bool tsBufIsValidElem(STSElem* pElem);
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <tglobal.h>
#include "os.h" #include "os.h"
#include "tpercentile.h" #include "tpercentile.h"
...@@ -253,7 +254,7 @@ tMemBucket *tMemBucketCreate(int16_t nElemSize, int16_t dataType, double minval, ...@@ -253,7 +254,7 @@ tMemBucket *tMemBucketCreate(int16_t nElemSize, int16_t dataType, double minval,
resetSlotInfo(pBucket); resetSlotInfo(pBucket);
int32_t ret = createDiskbasedResultBuffer(&pBucket->pBuffer, pBucket->bufPageSize, pBucket->bufPageSize * 512, 1); int32_t ret = createDiskbasedResultBuffer(&pBucket->pBuffer, pBucket->bufPageSize, pBucket->bufPageSize * 512, 1, tsTempDir);
if (ret != 0) { if (ret != 0) {
tMemBucketDestroy(pBucket); tMemBucketDestroy(pBucket);
return NULL; return NULL;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#define GET_DATA_PAYLOAD(_p) ((char *)(_p)->pData + POINTER_BYTES) #define GET_DATA_PAYLOAD(_p) ((char *)(_p)->pData + POINTER_BYTES)
#define NO_IN_MEM_AVAILABLE_PAGES(_b) (listNEles((_b)->lruList) >= (_b)->inMemPages) #define NO_IN_MEM_AVAILABLE_PAGES(_b) (listNEles((_b)->lruList) >= (_b)->inMemPages)
int32_t createDiskbasedResultBuffer(SDiskbasedResultBuf** pResultBuf, int32_t pagesize, int32_t inMemBufSize, uint64_t qId) { int32_t createDiskbasedResultBuffer(SDiskbasedResultBuf** pResultBuf, int32_t pagesize, int32_t inMemBufSize, uint64_t qId, const char* dir) {
*pResultBuf = calloc(1, sizeof(SDiskbasedResultBuf)); *pResultBuf = calloc(1, sizeof(SDiskbasedResultBuf));
SDiskbasedResultBuf* pResBuf = *pResultBuf; SDiskbasedResultBuf* pResBuf = *pResultBuf;
...@@ -36,7 +36,7 @@ int32_t createDiskbasedResultBuffer(SDiskbasedResultBuf** pResultBuf, int32_t pa ...@@ -36,7 +36,7 @@ int32_t createDiskbasedResultBuffer(SDiskbasedResultBuf** pResultBuf, int32_t pa
pResBuf->all = taosHashInit(10, taosGetDefaultHashFunction(TSDB_DATA_TYPE_INT), true, false); pResBuf->all = taosHashInit(10, taosGetDefaultHashFunction(TSDB_DATA_TYPE_INT), true, false);
char path[PATH_MAX] = {0}; char path[PATH_MAX] = {0};
taosGetTmpfilePath("qbuf", path); taosGetTmpfilePath(dir, "qbuf", path);
pResBuf->path = strdup(path); pResBuf->path = strdup(path);
pResBuf->emptyDummyIdList = taosArrayInit(1, sizeof(int32_t)); pResBuf->emptyDummyIdList = taosArrayInit(1, sizeof(int32_t));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册