TD-100
This commit is contained in:
parent
5c915f0d42
commit
a299c6769e
|
@ -110,7 +110,8 @@ typedef struct SDataCol {
|
|||
int bytes;
|
||||
int len;
|
||||
int offset;
|
||||
void * pData;
|
||||
void * pData; // Original data
|
||||
void * pCData; // Compressed data
|
||||
} SDataCol;
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -317,14 +317,17 @@ void tdInitDataCols(SDataCols *pCols, STSchema *pSchema) {
|
|||
pCols->numOfCols = schemaNCols(pSchema);
|
||||
|
||||
pCols->cols[0].pData = pCols->buf;
|
||||
int offset = TD_DATA_ROW_HEAD_SIZE;
|
||||
for (int i = 0; i < schemaNCols(pSchema); i++) {
|
||||
if (i > 0) {
|
||||
pCols->cols[i].pData = (char *)(pCols->cols[i - 1].pData) + schemaColAt(pSchema, i - 1)->bytes * pCols->maxPoints;
|
||||
}
|
||||
pCols->cols[i].type = colType(schemaColAt(pSchema, i));
|
||||
pCols->cols[i].bytes = colBytes(schemaColAt(pSchema, i));
|
||||
pCols->cols[i].offset = colOffset(schemaColAt(pSchema, i));
|
||||
pCols->cols[i].offset = offset;
|
||||
pCols->cols[i].colId = colColId(schemaColAt(pSchema, i));
|
||||
|
||||
offset += TYPE_BYTES[pCols->cols[i].type];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -379,3 +382,7 @@ static int tdFLenFromSchema(STSchema *pSchema) {
|
|||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int tdMergeDataCols(SDataCols *target, SDataCols *source) {
|
||||
|
||||
}
|
|
@ -205,6 +205,8 @@ ssize_t tsendfile(int dfd, int sfd, off_t *offset, size_t size);
|
|||
|
||||
ssize_t twrite(int fd, void *buf, size_t n);
|
||||
|
||||
ssize_t tread(int fd, void *buf, size_t count);
|
||||
|
||||
bool taosCheckPthreadValid(pthread_t thread);
|
||||
|
||||
void taosResetPthread(pthread_t *thread);
|
||||
|
|
Loading…
Reference in New Issue