fix: block format
This commit is contained in:
parent
5434019d2b
commit
ccba2c6612
|
@ -2028,9 +2028,6 @@ int32_t setResultDataPtr(SReqResultInfo* pResultInfo, TAOS_FIELD* pFields, int32
|
||||||
int32_t rows = *(int32_t*)p;
|
int32_t rows = *(int32_t*)p;
|
||||||
p += sizeof(int32_t);
|
p += sizeof(int32_t);
|
||||||
|
|
||||||
// bool blankFill = *(bool*)p;
|
|
||||||
p += sizeof(bool);
|
|
||||||
|
|
||||||
int32_t cols = *(int32_t*)p;
|
int32_t cols = *(int32_t*)p;
|
||||||
p += sizeof(int32_t);
|
p += sizeof(int32_t);
|
||||||
|
|
||||||
|
@ -2085,6 +2082,9 @@ int32_t setResultDataPtr(SReqResultInfo* pResultInfo, TAOS_FIELD* pFields, int32
|
||||||
pStart += colLength[i];
|
pStart += colLength[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// bool blankFill = *(bool*)p;
|
||||||
|
p += sizeof(bool);
|
||||||
|
|
||||||
if (convertUcs4) {
|
if (convertUcs4) {
|
||||||
code = doConvertUCS4(pResultInfo, numOfRows, numOfCols, colLength);
|
code = doConvertUCS4(pResultInfo, numOfRows, numOfCols, colLength);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2208,10 +2208,6 @@ int32_t blockEncode(const SSDataBlock* pBlock, char* data, int32_t numOfCols) {
|
||||||
data += sizeof(int32_t);
|
data += sizeof(int32_t);
|
||||||
ASSERT(*rows > 0);
|
ASSERT(*rows > 0);
|
||||||
|
|
||||||
bool* blankFill = (bool*)data;
|
|
||||||
*blankFill = pBlock->info.blankFill;
|
|
||||||
data += sizeof(bool);
|
|
||||||
|
|
||||||
int32_t* cols = (int32_t*)data;
|
int32_t* cols = (int32_t*)data;
|
||||||
*cols = numOfCols;
|
*cols = numOfCols;
|
||||||
data += sizeof(int32_t);
|
data += sizeof(int32_t);
|
||||||
|
@ -2287,6 +2283,10 @@ int32_t blockEncode(const SSDataBlock* pBlock, char* data, int32_t numOfCols) {
|
||||||
// htonl(colSizes[col]), colSizes[col]);
|
// htonl(colSizes[col]), colSizes[col]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool* blankFill = (bool*)data;
|
||||||
|
*blankFill = pBlock->info.blankFill;
|
||||||
|
data += sizeof(bool);
|
||||||
|
|
||||||
*actualLen = dataLen;
|
*actualLen = dataLen;
|
||||||
*groupId = pBlock->info.id.groupId;
|
*groupId = pBlock->info.id.groupId;
|
||||||
ASSERT(dataLen > 0);
|
ASSERT(dataLen > 0);
|
||||||
|
@ -2307,9 +2307,6 @@ const char* blockDecode(SSDataBlock* pBlock, const char* pData) {
|
||||||
int32_t numOfRows = *(int32_t*)pStart;
|
int32_t numOfRows = *(int32_t*)pStart;
|
||||||
pStart += sizeof(int32_t);
|
pStart += sizeof(int32_t);
|
||||||
|
|
||||||
bool blankFill = *(bool*)pStart;
|
|
||||||
pStart += sizeof(bool);
|
|
||||||
|
|
||||||
// total columns sizeof(int32_t)
|
// total columns sizeof(int32_t)
|
||||||
int32_t numOfCols = *(int32_t*)pStart;
|
int32_t numOfCols = *(int32_t*)pStart;
|
||||||
pStart += sizeof(int32_t);
|
pStart += sizeof(int32_t);
|
||||||
|
@ -2383,6 +2380,9 @@ const char* blockDecode(SSDataBlock* pBlock, const char* pData) {
|
||||||
pStart += colLen[i];
|
pStart += colLen[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool blankFill = *(bool*)pStart;
|
||||||
|
pStart += sizeof(bool);
|
||||||
|
|
||||||
pBlock->info.dataLoad = 1;
|
pBlock->info.dataLoad = 1;
|
||||||
pBlock->info.rows = numOfRows;
|
pBlock->info.rows = numOfRows;
|
||||||
pBlock->info.blankFill = blankFill;
|
pBlock->info.blankFill = blankFill;
|
||||||
|
|
Loading…
Reference in New Issue