提交 c2d95cbc 编写于 作者: H Hongze Cheng

more

上级 62e01aba
...@@ -42,7 +42,10 @@ int32_t tTSchemaCreate(int32_t sver, SSchema *pSchema, int32_t nCols, STSchema * ...@@ -42,7 +42,10 @@ int32_t tTSchemaCreate(int32_t sver, SSchema *pSchema, int32_t nCols, STSchema *
void tTSchemaDestroy(STSchema *pTSchema); void tTSchemaDestroy(STSchema *pTSchema);
// STSRow2 // STSRow2
int32_t tTSRowNew(SArray *pArray, STSchema *pTSchema, STSRow2 **ppRow); #define COL_VAL_NONE(CID) ((SColVal){.cid = (CID), .isNone = 1})
#define COL_VAL_NULL(CID) ((SColVal){.cid = (CID), .isNull = 1})
#define COL_VAL_VALUE(CID, V) ((SColVal){.cid = (CID), .value = (V)})
int32_t tTSRowClone(const STSRow2 *pRow, STSRow2 **ppRow); int32_t tTSRowClone(const STSRow2 *pRow, STSRow2 **ppRow);
void tTSRowFree(STSRow2 *pRow); void tTSRowFree(STSRow2 *pRow);
void tTSRowGet(STSRow2 *pRow, STSchema *pTSchema, int32_t iCol, SColVal *pColVal); void tTSRowGet(STSRow2 *pRow, STSchema *pTSchema, int32_t iCol, SColVal *pColVal);
......
...@@ -389,11 +389,9 @@ void tTSRowGet(STSRow2 *pRow, STSchema *pTSchema, int32_t iCol, SColVal *pColVal ...@@ -389,11 +389,9 @@ void tTSRowGet(STSRow2 *pRow, STSchema *pTSchema, int32_t iCol, SColVal *pColVal
} }
if (flags == TSROW_HAS_NONE) { if (flags == TSROW_HAS_NONE) {
*pColVal = (SColVal){.isNone = 1, .cid = pTColumn->colId}; goto _return_none;
return;
} else if (flags == TSROW_HAS_NONE) { } else if (flags == TSROW_HAS_NONE) {
*pColVal = (SColVal){.isNull = 1, .cid = pTColumn->colId}; goto _return_null;
return;
} }
ASSERT(pRow->nData && pRow->pData); ASSERT(pRow->nData && pRow->pData);
...@@ -510,15 +508,15 @@ void tTSRowGet(STSRow2 *pRow, STSchema *pTSchema, int32_t iCol, SColVal *pColVal ...@@ -510,15 +508,15 @@ void tTSRowGet(STSRow2 *pRow, STSchema *pTSchema, int32_t iCol, SColVal *pColVal
} }
_return_none: _return_none:
*pColVal = (SColVal){.cid = pTColumn->colId, .isNone = 1}; *pColVal = COL_VAL_NONE(pTColumn->colId);
return; return;
_return_null: _return_null:
*pColVal = (SColVal){.cid = pTColumn->colId, .isNull = 1}; *pColVal = COL_VAL_NULL(pTColumn->colId);
return; return;
_return_value: _return_value:
*pColVal = (SColVal){.cid = pTColumn->colId, .value = value}; *pColVal = COL_VAL_VALUE(pTColumn->colId, value);
return; return;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册