fix(query):set correct offset.
This commit is contained in:
parent
abc9065094
commit
99cabaee18
|
@ -2947,7 +2947,7 @@ int taos_write_raw_block(TAOS* taos, int rows, char* pData, const char* tbname)
|
||||||
tdSRowSetTpInfo(&rb, numOfCols, fLen);
|
tdSRowSetTpInfo(&rb, numOfCols, fLen);
|
||||||
int32_t dataLen = 0;
|
int32_t dataLen = 0;
|
||||||
|
|
||||||
char* pStart = pData + getVersion1BlockMetaSize(pData, numOfCols) - numOfCols * (sizeof(int8_t) + sizeof(int32_t));
|
char* pStart = pData + getVersion1BlockMetaSize(pData, numOfCols);
|
||||||
int32_t* colLength = (int32_t*)pStart;
|
int32_t* colLength = (int32_t*)pStart;
|
||||||
pStart += sizeof(int32_t) * numOfCols;
|
pStart += sizeof(int32_t) * numOfCols;
|
||||||
|
|
||||||
|
@ -2977,6 +2977,7 @@ int taos_write_raw_block(TAOS* taos, int rows, char* pData, const char* tbname)
|
||||||
char* data = pCol[k].pData + pCol[k].offset[j];
|
char* data = pCol[k].pData + pCol[k].offset[j];
|
||||||
tdAppendColValToRow(&rb, pColumn->colId, pColumn->type, TD_VTYPE_NORM, data, true, offset, k);
|
tdAppendColValToRow(&rb, pColumn->colId, pColumn->type, TD_VTYPE_NORM, data, true, offset, k);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
tdAppendColValToRow(&rb, pColumn->colId, pColumn->type, TD_VTYPE_NULL, NULL, false, offset, k);
|
tdAppendColValToRow(&rb, pColumn->colId, pColumn->type, TD_VTYPE_NULL, NULL, false, offset, k);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue