Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
a5725b50
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a5725b50
编写于
11月 16, 2022
作者:
H
Hongze Cheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
more code
上级
151d07e8
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
102 addition
and
163 deletion
+102
-163
include/common/tdataformat.h
include/common/tdataformat.h
+24
-50
source/common/src/tdataformat.c
source/common/src/tdataformat.c
+70
-105
source/dnode/vnode/src/inc/tsdb.h
source/dnode/vnode/src/inc/tsdb.h
+2
-2
source/dnode/vnode/src/tsdb/tsdbDiskData.c
source/dnode/vnode/src/tsdb/tsdbDiskData.c
+4
-4
source/dnode/vnode/src/tsdb/tsdbUtil.c
source/dnode/vnode/src/tsdb/tsdbUtil.c
+2
-2
未找到文件。
include/common/tdataformat.h
浏览文件 @
a5725b50
...
@@ -27,17 +27,17 @@
...
@@ -27,17 +27,17 @@
extern
"C"
{
extern
"C"
{
#endif
#endif
typedef
struct
SBuffer
SBuffer
;
typedef
struct
SBuffer
SBuffer
;
typedef
struct
SSchema
SSchema
;
typedef
struct
SSchema
SSchema
;
typedef
struct
STColumn
STColumn
;
typedef
struct
STColumn
STColumn
;
typedef
struct
STSchema
STSchema
;
typedef
struct
STSchema
STSchema
;
typedef
struct
SValue
SValue
;
typedef
struct
SValue
SValue
;
typedef
struct
SColVal
SColVal
;
typedef
struct
SColVal
SColVal
;
typedef
struct
S
TSRow2
STSRow2
;
typedef
struct
S
Row
SRow
;
typedef
struct
S
TSRowBuilder
STSRowBuild
er
;
typedef
struct
S
RowIter
SRowIt
er
;
typedef
struct
STagVal
STagVal
;
typedef
struct
STagVal
STagVal
;
typedef
struct
STag
STag
;
typedef
struct
STag
STag
;
typedef
struct
SColData
SColData
;
typedef
struct
SColData
SColData
;
#define HAS_NONE ((uint8_t)0x1)
#define HAS_NONE ((uint8_t)0x1)
#define HAS_NULL ((uint8_t)0x2)
#define HAS_NULL ((uint8_t)0x2)
...
@@ -70,8 +70,7 @@ int32_t tBufferInit(SBuffer *pBuffer, int64_t size);
...
@@ -70,8 +70,7 @@ int32_t tBufferInit(SBuffer *pBuffer, int64_t size);
int32_t
tBufferPut
(
SBuffer
*
pBuffer
,
const
void
*
pData
,
int64_t
nData
);
int32_t
tBufferPut
(
SBuffer
*
pBuffer
,
const
void
*
pData
,
int64_t
nData
);
// STSchema ================================
// STSchema ================================
int32_t
tTSchemaCreate
(
int32_t
sver
,
SSchema
*
pSchema
,
int32_t
nCols
,
STSchema
**
ppTSchema
);
void
tTSchemaDestroy
(
STSchema
*
pTSchema
);
void
tTSchemaDestroy
(
STSchema
*
pTSchema
);
// SValue ================================
// SValue ================================
...
@@ -88,26 +87,12 @@ void tTSchemaDestroy(STSchema *pTSchema);
...
@@ -88,26 +87,12 @@ void tTSchemaDestroy(STSchema *pTSchema);
#define COL_VAL_IS_NULL(CV) ((CV)->flag == CV_FLAG_NULL)
#define COL_VAL_IS_NULL(CV) ((CV)->flag == CV_FLAG_NULL)
#define COL_VAL_IS_VALUE(CV) ((CV)->flag == CV_FLAG_VALUE)
#define COL_VAL_IS_VALUE(CV) ((CV)->flag == CV_FLAG_VALUE)
// STSRow2 ================================
// SRow ================================
#define TSROW_LEN(PROW, V) tGetI32v((uint8_t *)(PROW)->data, (V) ? &(V) : NULL)
int32_t
tTSRowPut
(
SArray
*
aColVal
,
STSchema
*
pTSchema
,
SBuffer
*
pBuffer
);
#define TSROW_SVER(PROW, V) tGetI32v((PROW)->data + TSROW_LEN(PROW, NULL), (V) ? &(V) : NULL)
void
tTSRowGet
(
SRow
*
pRow
,
STSchema
*
pTSchema
,
int32_t
iCol
,
SColVal
*
pColVal
);
int32_t
tTSRowToArray
(
SRow
*
pRow
,
STSchema
*
pTSchema
,
SArray
**
ppArray
);
int32_t
tTSRowNew
(
STSRowBuilder
*
pBuilder
,
SArray
*
pArray
,
STSchema
*
pTSchema
,
STSRow2
**
ppRow
);
int32_t
tTSRowClone
(
const
STSRow2
*
pRow
,
STSRow2
**
ppRow
);
// SRowIter ================================
void
tTSRowFree
(
STSRow2
*
pRow
);
void
tTSRowGet
(
STSRow2
*
pRow
,
STSchema
*
pTSchema
,
int32_t
iCol
,
SColVal
*
pColVal
);
int32_t
tTSRowToArray
(
STSRow2
*
pRow
,
STSchema
*
pTSchema
,
SArray
**
ppArray
);
int32_t
tPutTSRow
(
uint8_t
*
p
,
STSRow2
*
pRow
);
int32_t
tGetTSRow
(
uint8_t
*
p
,
STSRow2
**
ppRow
);
// STSRowBuilder ================================
#define tsRowBuilderInit() ((STSRowBuilder){0})
#define tsRowBuilderClear(B) \
do { \
if ((B)->pBuf) { \
taosMemoryFree((B)->pBuf); \
} \
} while (0)
// STag ================================
// STag ================================
int32_t
tTagNew
(
SArray
*
pArray
,
int32_t
version
,
int8_t
isJson
,
STag
**
ppTag
);
int32_t
tTagNew
(
SArray
*
pArray
,
int32_t
version
,
int8_t
isJson
,
STag
**
ppTag
);
...
@@ -151,23 +136,12 @@ struct STSchema {
...
@@ -151,23 +136,12 @@ struct STSchema {
STColumn
columns
[];
STColumn
columns
[];
};
};
#define TSROW_HAS_NONE ((uint8_t)0x1)
struct
SRow
{
#define TSROW_HAS_NULL ((uint8_t)0x2U)
uint8_t
flag
;
#define TSROW_HAS_VAL ((uint8_t)0x4U)
uint8_t
rsv
;
#define TSROW_KV_SMALL ((uint8_t)0x10U)
uint16_t
sver
;
#define TSROW_KV_MID ((uint8_t)0x20U)
uint32_t
len
;
#define TSROW_KV_BIG ((uint8_t)0x40U)
uint8_t
data
[];
#pragma pack(push, 1)
struct
STSRow2
{
TSKEY
ts
;
uint8_t
flags
;
uint8_t
data
[];
};
#pragma pack(pop)
struct
STSRowBuilder
{
int32_t
szBuf
;
uint8_t
*
pBuf
;
};
};
struct
SValue
{
struct
SValue
{
...
...
source/common/src/tdataformat.c
浏览文件 @
a5725b50
...
@@ -65,44 +65,42 @@ static FORCE_INLINE int32_t tPutValue(uint8_t *p, SValue *pValue, int8_t type) {
...
@@ -65,44 +65,42 @@ static FORCE_INLINE int32_t tPutValue(uint8_t *p, SValue *pValue, int8_t type) {
}
}
}
}
// STSRow2 ========================================================================
// SRow ========================================================================
static
void
setBitMap
(
uint8_t
*
pb
,
uint8_t
v
,
int32_t
idx
,
uint8_t
flags
)
{
int32_t
tTSRowPut
(
SArray
*
aColVal
,
STSchema
*
pTSchema
,
SBuffer
*
pBuffer
)
{
if
(
pb
)
{
int32_t
code
=
0
;
switch
(
flags
&
0xf
)
{
case
TSROW_HAS_NULL
|
TSROW_HAS_NONE
:
case
TSROW_HAS_VAL
|
TSROW_HAS_NONE
:
if
(
v
)
{
SET_BIT1
(
pb
,
idx
,
(
uint8_t
)
1
);
}
else
{
SET_BIT1
(
pb
,
idx
,
(
uint8_t
)
0
);
}
break
;
case
TSROW_HAS_VAL
|
TSROW_HAS_NULL
:
v
=
v
-
1
;
SET_BIT1
(
pb
,
idx
,
v
);
break
;
case
TSROW_HAS_VAL
|
TSROW_HAS_NULL
|
TSROW_HAS_NONE
:
SET_BIT2
(
pb
,
idx
,
v
);
break
;
default:
ASSERT
(
taosArrayGetSize
(
aColVal
)
==
0
);
ASSERT
(
0
);
uint8_t
flag
=
0
;
int32_t
iColVal
=
0
;
SColVal
*
pColVal
=
taosArrayGet
(
aColVal
,
iColVal
);
int32_t
iTColumn
=
0
;
STColumn
*
pTColumn
=
pTSchema
->
columns
+
iTColumn
;
while
(
pTColumn
)
{
if
(
pColVal
)
{
if
(
pColVal
->
cid
==
pTColumn
->
colId
)
{
if
(
COL_VAL_IS_VALUE
(
pColVal
))
{
// VALUE
flag
|=
HAS_VALUE
;
}
else
if
(
COL_VAL_IS_NONE
(
pColVal
))
{
// NONE
flag
|=
HAS_NONE
;
}
else
{
// NULL
flag
|=
HAS_NULL
;
}
pTColumn
=
(
++
iTColumn
<
pTSchema
->
numOfCols
)
?
pTSchema
->
columns
+
iTColumn
:
NULL
;
pColVal
=
(
++
iColVal
<
taosArrayGetSize
(
aColVal
))
?
taosArrayGet
(
aColVal
,
iColVal
)
:
NULL
;
}
else
if
(
pColVal
->
cid
<
pTColumn
->
colId
)
{
pColVal
=
(
++
iColVal
<
taosArrayGetSize
(
aColVal
))
?
taosArrayGet
(
aColVal
,
iColVal
)
:
NULL
;
}
else
{
// NONE
flag
|=
HAS_NONE
;
pTColumn
=
(
++
iTColumn
<
pTSchema
->
numOfCols
)
?
pTSchema
->
columns
+
iTColumn
:
NULL
;
}
}
else
{
// NONE
flag
|=
HAS_NONE
;
pTColumn
=
(
++
iTColumn
<
pTSchema
->
numOfCols
)
?
pTSchema
->
columns
+
iTColumn
:
NULL
;
}
}
}
}
}
#define SET_IDX(p, i, n, f) \
do { \
if ((f)&TSROW_KV_SMALL) { \
((uint8_t *)(p))[i] = (n); \
} else if ((f)&TSROW_KV_MID) { \
((uint16_t *)(p))[i] = (n); \
} else { \
((uint32_t *)(p))[i] = (n); \
} \
} while (0)
#if 0
int32_t tTSRowNew(STSRowBuilder *pBuilder, SArray *pArray, STSchema *pTSchema, STSRow2 **ppRow) {
int32_t code = 0;
#if 0
#if 0
STColumn *pTColumn;
STColumn *pTColumn;
SColVal *pColVal;
SColVal *pColVal;
...
@@ -238,7 +236,7 @@ int32_t tTSRowNew(STSRowBuilder *pBuilder, SArray *pArray, STSchema *pTSchema, S
...
@@ -238,7 +236,7 @@ int32_t tTSRowNew(STSRowBuilder *pBuilder, SArray *pArray, STSchema *pTSchema, S
*ppRow = &pBuilder->tsRow;
*ppRow = &pBuilder->tsRow;
} else {
} else {
// create a new one
// create a new one
*ppRow = (S
TSRow2 *)taosMemoryMalloc(sizeof(STSRow2
));
*ppRow = (S
Row *)taosMemoryMalloc(sizeof(SRow
));
if (*ppRow == NULL) {
if (*ppRow == NULL) {
code = TSDB_CODE_OUT_OF_MEMORY;
code = TSDB_CODE_OUT_OF_MEMORY;
goto _exit;
goto _exit;
...
@@ -391,33 +389,54 @@ int32_t tTSRowNew(STSRowBuilder *pBuilder, SArray *pArray, STSchema *pTSchema, S
...
@@ -391,33 +389,54 @@ int32_t tTSRowNew(STSRowBuilder *pBuilder, SArray *pArray, STSchema *pTSchema, S
}
}
#endif
#endif
_exit:
_exit:
return
code
;
return
code
;
}
}
int32_t tTSRowClone(const STSRow2 *pRow, STSRow2 **ppRow) {
#if 0
int32_t code = 0;
static void setBitMap(uint8_t *pb, uint8_t v, int32_t idx, uint8_t flags) {
int32_t rLen = 0;
if (pb) {
switch (flags & 0xf) {
case TSROW_HAS_NULL | TSROW_HAS_NONE:
case TSROW_HAS_VAL | TSROW_HAS_NONE:
if (v) {
SET_BIT1(pb, idx, (uint8_t)1);
} else {
SET_BIT1(pb, idx, (uint8_t)0);
}
break;
case TSROW_HAS_VAL | TSROW_HAS_NULL:
v = v - 1;
SET_BIT1(pb, idx, v);
break;
case TSROW_HAS_VAL | TSROW_HAS_NULL | TSROW_HAS_NONE:
SET_BIT2(pb, idx, v);
break;
TSROW_LEN(pRow, rLen);
default:
(*ppRow) = (STSRow2 *)taosMemoryMalloc(rLen);
ASSERT(0);
if (*ppRow == NULL) {
}
code = TSDB_CODE_OUT_OF_MEMORY;
goto _exit;
}
}
memcpy(*ppRow, pRow, rLen);
_exit:
return code;
}
}
#define SET_IDX(p, i, n, f) \
do { \
if ((f)&TSROW_KV_SMALL) { \
((uint8_t *)(p))[i] = (n); \
} else if ((f)&TSROW_KV_MID) { \
((uint16_t *)(p))[i] = (n); \
} else { \
((uint32_t *)(p))[i] = (n); \
} \
} while (0)
void tTSRowFree(S
TSRow2
*pRow) {
void tTSRowFree(S
Row
*pRow) {
if (pRow) {
if (pRow) {
taosMemoryFree(pRow);
taosMemoryFree(pRow);
}
}
}
}
void tTSRowGet(S
TSRow2
*pRow, STSchema *pTSchema, int32_t iCol, SColVal *pColVal) {
void tTSRowGet(S
Row
*pRow, STSchema *pTSchema, int32_t iCol, SColVal *pColVal) {
uint8_t isTuple = ((pRow->flags & 0xf0) == 0) ? 1 : 0;
uint8_t isTuple = ((pRow->flags & 0xf0) == 0) ? 1 : 0;
STColumn *pTColumn = &pTSchema->columns[iCol];
STColumn *pTColumn = &pTSchema->columns[iCol];
uint8_t flags = pRow->flags & (uint8_t)0xf;
uint8_t flags = pRow->flags & (uint8_t)0xf;
...
@@ -564,7 +583,7 @@ _return_value:
...
@@ -564,7 +583,7 @@ _return_value:
return;
return;
}
}
int32_t tTSRowToArray(S
TSRow2
*pRow, STSchema *pTSchema, SArray **ppArray) {
int32_t tTSRowToArray(S
Row
*pRow, STSchema *pTSchema, SArray **ppArray) {
int32_t code = 0;
int32_t code = 0;
SColVal cv;
SColVal cv;
...
@@ -584,62 +603,8 @@ _exit:
...
@@ -584,62 +603,8 @@ _exit:
return code;
return code;
}
}
#endif
#endif
int32_t
tPutTSRow
(
uint8_t
*
p
,
STSRow2
*
pRow
)
{
int32_t
n
=
0
;
TSROW_LEN
(
pRow
,
n
);
if
(
p
)
{
memcpy
(
p
,
pRow
,
n
);
}
return
n
;
}
int32_t
tGetTSRow
(
uint8_t
*
p
,
STSRow2
**
ppRow
)
{
int32_t
n
=
0
;
*
ppRow
=
(
STSRow2
*
)
p
;
TSROW_LEN
(
*
ppRow
,
n
);
return
n
;
}
// STSchema ========================================
// STSchema ========================================
int32_t
tTSchemaCreate
(
int32_t
sver
,
SSchema
*
pSchema
,
int32_t
ncols
,
STSchema
**
ppTSchema
)
{
*
ppTSchema
=
(
STSchema
*
)
taosMemoryMalloc
(
sizeof
(
STSchema
)
+
sizeof
(
STColumn
)
*
ncols
);
if
(
*
ppTSchema
==
NULL
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
return
-
1
;
}
(
*
ppTSchema
)
->
numOfCols
=
ncols
;
(
*
ppTSchema
)
->
version
=
sver
;
(
*
ppTSchema
)
->
flen
=
0
;
(
*
ppTSchema
)
->
vlen
=
0
;
(
*
ppTSchema
)
->
tlen
=
0
;
for
(
int32_t
iCol
=
0
;
iCol
<
ncols
;
iCol
++
)
{
SSchema
*
pColumn
=
&
pSchema
[
iCol
];
STColumn
*
pTColumn
=
&
((
*
ppTSchema
)
->
columns
[
iCol
]);
pTColumn
->
colId
=
pColumn
->
colId
;
pTColumn
->
type
=
pColumn
->
type
;
pTColumn
->
flags
=
pColumn
->
flags
;
pTColumn
->
bytes
=
pColumn
->
bytes
;
pTColumn
->
offset
=
(
*
ppTSchema
)
->
flen
;
// skip first column
if
(
iCol
)
{
(
*
ppTSchema
)
->
flen
+=
TYPE_BYTES
[
pColumn
->
type
];
if
(
IS_VAR_DATA_TYPE
(
pColumn
->
type
))
{
(
*
ppTSchema
)
->
vlen
+=
(
pColumn
->
bytes
+
5
);
}
}
}
return
0
;
}
void
tTSchemaDestroy
(
STSchema
*
pTSchema
)
{
void
tTSchemaDestroy
(
STSchema
*
pTSchema
)
{
if
(
pTSchema
)
taosMemoryFree
(
pTSchema
);
if
(
pTSchema
)
taosMemoryFree
(
pTSchema
);
}
}
...
...
source/dnode/vnode/src/inc/tsdb.h
浏览文件 @
a5725b50
...
@@ -112,8 +112,8 @@ void tsdbRowGetColVal(TSDBROW *pRow, STSchema *pTSchema, int32_t iCol, SColVal *
...
@@ -112,8 +112,8 @@ void tsdbRowGetColVal(TSDBROW *pRow, STSchema *pTSchema, int32_t iCol, SColVal *
// int32_t tPutTSDBRow(uint8_t *p, TSDBROW *pRow);
// int32_t tPutTSDBRow(uint8_t *p, TSDBROW *pRow);
int32_t
tsdbRowCmprFn
(
const
void
*
p1
,
const
void
*
p2
);
int32_t
tsdbRowCmprFn
(
const
void
*
p1
,
const
void
*
p2
);
// STSDBRowIter
// STSDBRowIter
void
tRowIterInit
(
STSDBRowIter
*
pIter
,
TSDBROW
*
pRow
,
STSchema
*
pTSchema
);
void
t
sdb
RowIterInit
(
STSDBRowIter
*
pIter
,
TSDBROW
*
pRow
,
STSchema
*
pTSchema
);
SColVal
*
tRowIterNext
(
STSDBRowIter
*
pIter
);
SColVal
*
t
sdb
RowIterNext
(
STSDBRowIter
*
pIter
);
// SRowMerger
// SRowMerger
int32_t
tRowMergerInit2
(
SRowMerger
*
pMerger
,
STSchema
*
pResTSchema
,
TSDBROW
*
pRow
,
STSchema
*
pTSchema
);
int32_t
tRowMergerInit2
(
SRowMerger
*
pMerger
,
STSchema
*
pResTSchema
,
TSDBROW
*
pRow
,
STSchema
*
pTSchema
);
int32_t
tRowMergerAdd
(
SRowMerger
*
pMerger
,
TSDBROW
*
pRow
,
STSchema
*
pTSchema
);
int32_t
tRowMergerAdd
(
SRowMerger
*
pMerger
,
TSDBROW
*
pRow
,
STSchema
*
pTSchema
);
...
...
source/dnode/vnode/src/tsdb/tsdbDiskData.c
浏览文件 @
a5725b50
...
@@ -596,20 +596,20 @@ int32_t tDiskDataAddRow(SDiskDataBuilder *pBuilder, TSDBROW *pRow, STSchema *pTS
...
@@ -596,20 +596,20 @@ int32_t tDiskDataAddRow(SDiskDataBuilder *pBuilder, TSDBROW *pRow, STSchema *pTS
if
(
pBuilder
->
bi
.
maxKey
<
kRow
.
ts
)
pBuilder
->
bi
.
maxKey
=
kRow
.
ts
;
if
(
pBuilder
->
bi
.
maxKey
<
kRow
.
ts
)
pBuilder
->
bi
.
maxKey
=
kRow
.
ts
;
STSDBRowIter
iter
=
{
0
};
STSDBRowIter
iter
=
{
0
};
tRowIterInit
(
&
iter
,
pRow
,
pTSchema
);
t
sdb
RowIterInit
(
&
iter
,
pRow
,
pTSchema
);
SColVal
*
pColVal
=
tRowIterNext
(
&
iter
);
SColVal
*
pColVal
=
t
sdb
RowIterNext
(
&
iter
);
for
(
int32_t
iBuilder
=
0
;
iBuilder
<
pBuilder
->
nBuilder
;
iBuilder
++
)
{
for
(
int32_t
iBuilder
=
0
;
iBuilder
<
pBuilder
->
nBuilder
;
iBuilder
++
)
{
SDiskColBuilder
*
pDCBuilder
=
(
SDiskColBuilder
*
)
taosArrayGet
(
pBuilder
->
aBuilder
,
iBuilder
);
SDiskColBuilder
*
pDCBuilder
=
(
SDiskColBuilder
*
)
taosArrayGet
(
pBuilder
->
aBuilder
,
iBuilder
);
while
(
pColVal
&&
pColVal
->
cid
<
pDCBuilder
->
cid
)
{
while
(
pColVal
&&
pColVal
->
cid
<
pDCBuilder
->
cid
)
{
pColVal
=
tRowIterNext
(
&
iter
);
pColVal
=
t
sdb
RowIterNext
(
&
iter
);
}
}
if
(
pColVal
&&
pColVal
->
cid
==
pDCBuilder
->
cid
)
{
if
(
pColVal
&&
pColVal
->
cid
==
pDCBuilder
->
cid
)
{
code
=
tDiskColAddVal
(
pDCBuilder
,
pColVal
);
code
=
tDiskColAddVal
(
pDCBuilder
,
pColVal
);
if
(
code
)
return
code
;
if
(
code
)
return
code
;
pColVal
=
tRowIterNext
(
&
iter
);
pColVal
=
t
sdb
RowIterNext
(
&
iter
);
}
else
{
}
else
{
code
=
tDiskColAddVal
(
pDCBuilder
,
&
COL_VAL_NONE
(
pDCBuilder
->
cid
,
pDCBuilder
->
type
));
code
=
tDiskColAddVal
(
pDCBuilder
,
&
COL_VAL_NONE
(
pDCBuilder
->
cid
,
pDCBuilder
->
type
));
if
(
code
)
return
code
;
if
(
code
)
return
code
;
...
...
source/dnode/vnode/src/tsdb/tsdbUtil.c
浏览文件 @
a5725b50
...
@@ -580,7 +580,7 @@ int32_t tsdbRowCmprFn(const void *p1, const void *p2) {
...
@@ -580,7 +580,7 @@ int32_t tsdbRowCmprFn(const void *p1, const void *p2) {
}
}
// STSDBRowIter ======================================================
// STSDBRowIter ======================================================
void
tRowIterInit
(
STSDBRowIter
*
pIter
,
TSDBROW
*
pRow
,
STSchema
*
pTSchema
)
{
void
t
sdb
RowIterInit
(
STSDBRowIter
*
pIter
,
TSDBROW
*
pRow
,
STSchema
*
pTSchema
)
{
pIter
->
pRow
=
pRow
;
pIter
->
pRow
=
pRow
;
if
(
pRow
->
type
==
0
)
{
if
(
pRow
->
type
==
0
)
{
ASSERT
(
pTSchema
);
ASSERT
(
pTSchema
);
...
@@ -594,7 +594,7 @@ void tRowIterInit(STSDBRowIter *pIter, TSDBROW *pRow, STSchema *pTSchema) {
...
@@ -594,7 +594,7 @@ void tRowIterInit(STSDBRowIter *pIter, TSDBROW *pRow, STSchema *pTSchema) {
}
}
}
}
SColVal
*
tRowIterNext
(
STSDBRowIter
*
pIter
)
{
SColVal
*
t
sdb
RowIterNext
(
STSDBRowIter
*
pIter
)
{
if
(
pIter
->
pRow
->
type
==
0
)
{
if
(
pIter
->
pRow
->
type
==
0
)
{
if
(
pIter
->
i
<
pIter
->
pTSchema
->
numOfCols
)
{
if
(
pIter
->
i
<
pIter
->
pTSchema
->
numOfCols
)
{
tTSRowGetVal
(
pIter
->
pRow
->
pTSRow
,
pIter
->
pTSchema
,
pIter
->
i
,
&
pIter
->
colVal
);
tTSRowGetVal
(
pIter
->
pRow
->
pTSRow
,
pIter
->
pTSchema
,
pIter
->
i
,
&
pIter
->
colVal
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录