Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
92da01a8
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
92da01a8
编写于
3月 04, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-13039] refactor.
上级
4bfece6e
变更
35
隐藏空白更改
内联
并排
Showing
35 changed file
with
114 addition
and
139 deletion
+114
-139
include/common/tcommon.h
include/common/tcommon.h
+0
-18
include/common/tdatablock.h
include/common/tdatablock.h
+0
-0
include/libs/scalar/filter.h
include/libs/scalar/filter.h
+3
-2
include/libs/sync/sync.h
include/libs/sync/sync.h
+1
-1
include/util/thash.h
include/util/thash.h
+3
-12
source/client/inc/clientInt.h
source/client/inc/clientInt.h
+2
-2
source/client/src/clientImpl.c
source/client/src/clientImpl.c
+1
-1
source/client/src/tmq.c
source/client/src/tmq.c
+1
-1
source/common/src/tdatablock.c
source/common/src/tdatablock.c
+1
-1
source/common/src/tglobal.c
source/common/src/tglobal.c
+1
-1
source/common/test/commonTests.cpp
source/common/test/commonTests.cpp
+2
-2
source/dnode/mgmt/impl/inc/dndInt.h
source/dnode/mgmt/impl/inc/dndInt.h
+3
-3
source/dnode/mgmt/impl/test/sut/src/client.cpp
source/dnode/mgmt/impl/test/sut/src/client.cpp
+1
-1
source/dnode/mnode/impl/inc/mndInt.h
source/dnode/mnode/impl/inc/mndInt.h
+1
-1
source/libs/catalog/test/catalogTests.cpp
source/libs/catalog/test/catalogTests.cpp
+2
-2
source/libs/executor/src/executorimpl.c
source/libs/executor/src/executorimpl.c
+4
-6
source/libs/executor/src/tsort.c
source/libs/executor/src/tsort.c
+2
-2
source/libs/executor/test/executorTests.cpp
source/libs/executor/test/executorTests.cpp
+5
-5
source/libs/executor/test/sortTests.cpp
source/libs/executor/test/sortTests.cpp
+1
-1
source/libs/function/src/taggfunction.c
source/libs/function/src/taggfunction.c
+1
-1
source/libs/parser/test/mockCatalogService.cpp
source/libs/parser/test/mockCatalogService.cpp
+1
-1
source/libs/qworker/test/qworkerTests.cpp
source/libs/qworker/test/qworkerTests.cpp
+8
-9
source/libs/scalar/inc/filterInt.h
source/libs/scalar/inc/filterInt.h
+5
-5
source/libs/scalar/src/filter.c
source/libs/scalar/src/filter.c
+3
-3
source/libs/scalar/src/scalar.c
source/libs/scalar/src/scalar.c
+5
-5
source/libs/scalar/src/sclvector.c
source/libs/scalar/src/sclvector.c
+6
-6
source/libs/scalar/test/filter/filterTests.cpp
source/libs/scalar/test/filter/filterTests.cpp
+7
-7
source/libs/scalar/test/scalar/scalarTests.cpp
source/libs/scalar/test/scalar/scalarTests.cpp
+6
-6
source/libs/scheduler/test/schedulerTests.cpp
source/libs/scheduler/test/schedulerTests.cpp
+4
-4
source/libs/sync/src/syncIO.c
source/libs/sync/src/syncIO.c
+1
-1
source/libs/transport/test/pushClient.c
source/libs/transport/test/pushClient.c
+1
-1
source/libs/transport/test/rclient.c
source/libs/transport/test/rclient.c
+1
-1
source/libs/transport/test/syncClient.c
source/libs/transport/test/syncClient.c
+1
-1
source/libs/transport/test/transUT.cc
source/libs/transport/test/transUT.cc
+2
-2
source/util/src/thash.c
source/util/src/thash.c
+28
-24
未找到文件。
include/common/tcommon.h
浏览文件 @
92da01a8
...
@@ -25,24 +25,6 @@
...
@@ -25,24 +25,6 @@
extern
"C"
{
extern
"C"
{
#endif
#endif
// typedef struct STimeWindow {
// TSKEY skey;
// TSKEY ekey;
// } STimeWindow;
// typedef struct {
// int32_t dataLen;
// char name[TSDB_TABLE_FNAME_LEN];
// char *data;
// } STagData;
// typedef struct SSchema {
// uint8_t type;
// char name[TSDB_COL_NAME_LEN];
// int16_t colId;
// int16_t bytes;
// } SSchema;
enum
{
enum
{
TMQ_CONF__RESET_OFFSET__LATEST
=
-
1
,
TMQ_CONF__RESET_OFFSET__LATEST
=
-
1
,
TMQ_CONF__RESET_OFFSET__EARLIEAST
=
-
2
,
TMQ_CONF__RESET_OFFSET__EARLIEAST
=
-
2
,
...
...
include/common/t
ep
.h
→
include/common/t
datablock
.h
浏览文件 @
92da01a8
文件已移动
include/libs/scalar/filter.h
浏览文件 @
92da01a8
...
@@ -19,10 +19,12 @@
...
@@ -19,10 +19,12 @@
extern
"C"
{
extern
"C"
{
#endif
#endif
#include "tcommon.h"
#include "nodes.h"
typedef
struct
SFilterInfo
SFilterInfo
;
typedef
struct
SFilterInfo
SFilterInfo
;
typedef
int32_t
(
*
filer_get_col_from_id
)(
void
*
,
int32_t
,
void
**
);
typedef
int32_t
(
*
filer_get_col_from_id
)(
void
*
,
int32_t
,
void
**
);
enum
{
enum
{
FLT_OPTION_NO_REWRITE
=
1
,
FLT_OPTION_NO_REWRITE
=
1
,
FLT_OPTION_TIMESTAMP
=
2
,
FLT_OPTION_TIMESTAMP
=
2
,
...
@@ -34,7 +36,6 @@ typedef struct SFilterColumnParam{
...
@@ -34,7 +36,6 @@ typedef struct SFilterColumnParam{
SArray
*
pDataBlock
;
SArray
*
pDataBlock
;
}
SFilterColumnParam
;
}
SFilterColumnParam
;
extern
int32_t
filterInitFromNode
(
SNode
*
pNode
,
SFilterInfo
**
pinfo
,
uint32_t
options
);
extern
int32_t
filterInitFromNode
(
SNode
*
pNode
,
SFilterInfo
**
pinfo
,
uint32_t
options
);
extern
bool
filterExecute
(
SFilterInfo
*
info
,
SSDataBlock
*
pSrc
,
int8_t
**
p
,
SColumnDataAgg
*
statis
,
int16_t
numOfCols
);
extern
bool
filterExecute
(
SFilterInfo
*
info
,
SSDataBlock
*
pSrc
,
int8_t
**
p
,
SColumnDataAgg
*
statis
,
int16_t
numOfCols
);
extern
int32_t
filterSetDataFromSlotId
(
SFilterInfo
*
info
,
void
*
param
);
extern
int32_t
filterSetDataFromSlotId
(
SFilterInfo
*
info
,
void
*
param
);
...
...
include/libs/sync/sync.h
浏览文件 @
92da01a8
...
@@ -21,7 +21,7 @@ extern "C" {
...
@@ -21,7 +21,7 @@ extern "C" {
#endif
#endif
#include <stdint.h>
#include <stdint.h>
#include <t
ep
.h>
#include <t
datablock
.h>
#include "taosdef.h"
#include "taosdef.h"
#include "trpc.h"
#include "trpc.h"
...
...
include/util/thash.h
浏览文件 @
92da01a8
...
@@ -28,7 +28,8 @@ typedef int32_t (*_equal_fn_t)(const void *, const void *, size_t len);
...
@@ -28,7 +28,8 @@ typedef int32_t (*_equal_fn_t)(const void *, const void *, size_t len);
typedef
void
(
*
_hash_before_fn_t
)(
void
*
);
typedef
void
(
*
_hash_before_fn_t
)(
void
*
);
typedef
void
(
*
_hash_free_fn_t
)(
void
*
);
typedef
void
(
*
_hash_free_fn_t
)(
void
*
);
#define HASH_NODE_EXIST(code) (code == -2)
#define HASH_KEY_ALREADY_EXISTS (-2)
#define HASH_NODE_EXIST(code) (code == HASH_KEY_ALREADY_EXISTS)
/**
/**
* murmur hash algorithm
* murmur hash algorithm
...
@@ -49,24 +50,14 @@ uint32_t taosIntHash_32(const char *key, uint32_t len);
...
@@ -49,24 +50,14 @@ uint32_t taosIntHash_32(const char *key, uint32_t len);
uint32_t
taosIntHash_64
(
const
char
*
key
,
uint32_t
len
);
uint32_t
taosIntHash_64
(
const
char
*
key
,
uint32_t
len
);
_hash_fn_t
taosGetDefaultHashFunction
(
int32_t
type
);
_hash_fn_t
taosGetDefaultHashFunction
(
int32_t
type
);
_equal_fn_t
taosGetDefaultEqualFunction
(
int32_t
type
);
_equal_fn_t
taosGetDefaultEqualFunction
(
int32_t
type
);
typedef
struct
SHashNode
{
struct
SHashNode
*
next
;
uint32_t
hashVal
;
// the hash value of key
uint32_t
dataLen
;
// length of data
uint32_t
keyLen
;
// length of the key
uint16_t
refCount
;
// reference count
int8_t
removed
;
// flag to indicate removed
char
data
[];
}
SHashNode
;
typedef
enum
SHashLockTypeE
{
typedef
enum
SHashLockTypeE
{
HASH_NO_LOCK
=
0
,
HASH_NO_LOCK
=
0
,
HASH_ENTRY_LOCK
=
1
,
HASH_ENTRY_LOCK
=
1
,
}
SHashLockTypeE
;
}
SHashLockTypeE
;
typedef
struct
SHashNode
SHashNode
;
typedef
struct
SHashObj
SHashObj
;
typedef
struct
SHashObj
SHashObj
;
/**
/**
...
...
source/client/inc/clientInt.h
浏览文件 @
92da01a8
...
@@ -20,12 +20,12 @@
...
@@ -20,12 +20,12 @@
extern
"C"
{
extern
"C"
{
#endif
#endif
#include "tcommon.h"
#include "parser.h"
#include "parser.h"
#include "query.h"
#include "query.h"
#include "taos.h"
#include "taos.h"
#include "tcommon.h"
#include "tdatablock.h"
#include "tdef.h"
#include "tdef.h"
#include "tep.h"
#include "thash.h"
#include "thash.h"
#include "tlist.h"
#include "tlist.h"
#include "tmsg.h"
#include "tmsg.h"
...
...
source/client/src/clientImpl.c
浏览文件 @
92da01a8
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
#include "parser.h"
#include "parser.h"
#include "planner.h"
#include "planner.h"
#include "scheduler.h"
#include "scheduler.h"
#include "tdatablock.h"
#include "tdef.h"
#include "tdef.h"
#include "tep.h"
#include "tglobal.h"
#include "tglobal.h"
#include "tmsgtype.h"
#include "tmsgtype.h"
#include "tpagedbuf.h"
#include "tpagedbuf.h"
...
...
source/client/src/tmq.c
浏览文件 @
92da01a8
...
@@ -20,8 +20,8 @@
...
@@ -20,8 +20,8 @@
#include "parser.h"
#include "parser.h"
#include "planner.h"
#include "planner.h"
#include "scheduler.h"
#include "scheduler.h"
#include "tdatablock.h"
#include "tdef.h"
#include "tdef.h"
#include "tep.h"
#include "tglobal.h"
#include "tglobal.h"
#include "tmsgtype.h"
#include "tmsgtype.h"
#include "tpagedbuf.h"
#include "tpagedbuf.h"
...
...
source/common/src/t
ep
.c
→
source/common/src/t
datablock
.c
浏览文件 @
92da01a8
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
*/
*/
#define _DEFAULT_SOURCE
#define _DEFAULT_SOURCE
#include "t
ep
.h"
#include "t
datablock
.h"
#include "tcompare.h"
#include "tcompare.h"
#include "tglobal.h"
#include "tglobal.h"
...
...
source/common/src/tglobal.c
浏览文件 @
92da01a8
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
#include "tglobal.h"
#include "tglobal.h"
#include "tcompare.h"
#include "tcompare.h"
#include "tconfig.h"
#include "tconfig.h"
#include "t
ep
.h"
#include "t
datablock
.h"
#include "tlog.h"
#include "tlog.h"
SConfig
*
tsCfg
=
NULL
;
SConfig
*
tsCfg
=
NULL
;
...
...
source/common/test/commonTests.cpp
浏览文件 @
92da01a8
#include "tcommon.h"
#include <gtest/gtest.h>
#include <gtest/gtest.h>
#include <t
ep
.h>
#include <t
datablock
.h>
#include <iostream>
#include <iostream>
#include "tcommon.h"
#pragma GCC diagnostic push
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wwrite-strings"
#pragma GCC diagnostic ignored "-Wwrite-strings"
...
...
source/dnode/mgmt/impl/inc/dndInt.h
浏览文件 @
92da01a8
...
@@ -23,9 +23,11 @@ extern "C" {
...
@@ -23,9 +23,11 @@ extern "C" {
#include "os.h"
#include "os.h"
#include "cJSON.h"
#include "cJSON.h"
#include "monitor.h"
#include "tcache.h"
#include "tcache.h"
#include "tcrc32c.h"
#include "tcrc32c.h"
#include "tep.h"
#include "tdatablock.h"
#include "tglobal.h"
#include "thash.h"
#include "thash.h"
#include "tlockfree.h"
#include "tlockfree.h"
#include "tlog.h"
#include "tlog.h"
...
@@ -35,8 +37,6 @@ extern "C" {
...
@@ -35,8 +37,6 @@ extern "C" {
#include "tthread.h"
#include "tthread.h"
#include "ttime.h"
#include "ttime.h"
#include "tworker.h"
#include "tworker.h"
#include "tglobal.h"
#include "monitor.h"
#include "dnode.h"
#include "dnode.h"
...
...
source/dnode/mgmt/impl/test/sut/src/client.cpp
浏览文件 @
92da01a8
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
*/
*/
#include "sut.h"
#include "sut.h"
#include "t
ep
.h"
#include "t
datablock
.h"
static
void
processClientRsp
(
void
*
parent
,
SRpcMsg
*
pRsp
,
SEpSet
*
pEpSet
)
{
static
void
processClientRsp
(
void
*
parent
,
SRpcMsg
*
pRsp
,
SEpSet
*
pEpSet
)
{
TestClient
*
client
=
(
TestClient
*
)
parent
;
TestClient
*
client
=
(
TestClient
*
)
parent
;
...
...
source/dnode/mnode/impl/inc/mndInt.h
浏览文件 @
92da01a8
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
#include "sdb.h"
#include "sdb.h"
#include "tcache.h"
#include "tcache.h"
#include "t
ep
.h"
#include "t
datablock
.h"
#include "tglobal.h"
#include "tglobal.h"
#include "tqueue.h"
#include "tqueue.h"
#include "ttime.h"
#include "ttime.h"
...
...
source/libs/catalog/test/catalogTests.cpp
浏览文件 @
92da01a8
...
@@ -27,13 +27,13 @@
...
@@ -27,13 +27,13 @@
#include "addr_any.h"
#include "addr_any.h"
#include "catalog.h"
#include "catalog.h"
#include "catalogInt.h"
#include "stub.h"
#include "stub.h"
#include "taos.h"
#include "taos.h"
#include "tdatablock.h"
#include "tdef.h"
#include "tdef.h"
#include "tep.h"
#include "trpc.h"
#include "trpc.h"
#include "tvariant.h"
#include "tvariant.h"
#include "catalogInt.h"
namespace
{
namespace
{
...
...
source/libs/executor/src/executorimpl.c
浏览文件 @
92da01a8
...
@@ -15,12 +15,12 @@
...
@@ -15,12 +15,12 @@
#include "os.h"
#include "os.h"
#include "tep.h"
#include "tsort.h"
#include "texception.h"
#include "parser.h"
#include "parser.h"
#include "tdatablock.h"
#include "texception.h"
#include "tglobal.h"
#include "tglobal.h"
#include "tmsg.h"
#include "tmsg.h"
#include "tsort.h"
#include "ttime.h"
#include "ttime.h"
#include "executorimpl.h"
#include "executorimpl.h"
...
@@ -8730,10 +8730,8 @@ static void doSetTagValueToResultBuf(char* output, const char* val, int16_t type
...
@@ -8730,10 +8730,8 @@ static void doSetTagValueToResultBuf(char* output, const char* val, int16_t type
static
int64_t
getQuerySupportBufSize
(
size_t
numOfTables
)
{
static
int64_t
getQuerySupportBufSize
(
size_t
numOfTables
)
{
size_t
s1
=
sizeof
(
STableQueryInfo
);
size_t
s1
=
sizeof
(
STableQueryInfo
);
size_t
s2
=
sizeof
(
SHashNode
);
// size_t s3 = sizeof(STableCheckInfo); buffer consumption in tsdb
// size_t s3 = sizeof(STableCheckInfo); buffer consumption in tsdb
return
(
int64_t
)(
(
s1
+
s2
)
*
1
.
5
*
numOfTables
);
return
(
int64_t
)(
s1
*
1
.
5
*
numOfTables
);
}
}
int32_t
checkForQueryBuf
(
size_t
numOfTables
)
{
int32_t
checkForQueryBuf
(
size_t
numOfTables
)
{
...
...
source/libs/executor/src/tsort.c
浏览文件 @
92da01a8
...
@@ -16,11 +16,11 @@
...
@@ -16,11 +16,11 @@
#include "tcommon.h"
#include "tcommon.h"
#include "query.h"
#include "query.h"
#include "tsort.h"
#include "tdatablock.h"
#include "tep.h"
#include "tdef.h"
#include "tdef.h"
#include "tlosertree.h"
#include "tlosertree.h"
#include "tpagedbuf.h"
#include "tpagedbuf.h"
#include "tsort.h"
#include "tutil.h"
#include "tutil.h"
typedef
struct
STupleHandle
{
typedef
struct
STupleHandle
{
...
...
source/libs/executor/test/executorTests.cpp
浏览文件 @
92da01a8
...
@@ -26,15 +26,15 @@
...
@@ -26,15 +26,15 @@
#pragma GCC diagnostic ignored "-Wsign-compare"
#pragma GCC diagnostic ignored "-Wsign-compare"
#include "os.h"
#include "os.h"
#include "executor.h"
#include "stub.h"
#include "taos.h"
#include "taos.h"
#include "tdatablock.h"
#include "tdef.h"
#include "tdef.h"
#include "tvariant.h"
#include "tep.h"
#include "trpc.h"
#include "stub.h"
#include "executor.h"
#include "tmsg.h"
#include "tmsg.h"
#include "tname.h"
#include "tname.h"
#include "trpc.h"
#include "tvariant.h"
namespace
{
namespace
{
...
...
source/libs/executor/test/sortTests.cpp
浏览文件 @
92da01a8
...
@@ -29,8 +29,8 @@
...
@@ -29,8 +29,8 @@
#include "executor.h"
#include "executor.h"
#include "stub.h"
#include "stub.h"
#include "taos.h"
#include "taos.h"
#include "tdatablock.h"
#include "tdef.h"
#include "tdef.h"
#include "tep.h"
#include "trpc.h"
#include "trpc.h"
#include "tvariant.h"
#include "tvariant.h"
...
...
source/libs/function/src/taggfunction.c
浏览文件 @
92da01a8
...
@@ -28,8 +28,8 @@
...
@@ -28,8 +28,8 @@
#include "tbuffer.h"
#include "tbuffer.h"
#include "tcompression.h"
#include "tcompression.h"
//#include "queryLog.h"
//#include "queryLog.h"
#include "tdatablock.h"
#include "tudf.h"
#include "tudf.h"
#include "tep.h"
#define GET_INPUT_DATA_LIST(x) ((char *)((x)->pInput))
#define GET_INPUT_DATA_LIST(x) ((char *)((x)->pInput))
#define GET_INPUT_DATA(x, y) ((char*) colDataGetData((x)->pInput, (y)))
#define GET_INPUT_DATA(x, y) ((char*) colDataGetData((x)->pInput, (y)))
...
...
source/libs/parser/test/mockCatalogService.cpp
浏览文件 @
92da01a8
...
@@ -15,10 +15,10 @@
...
@@ -15,10 +15,10 @@
#include "mockCatalogService.h"
#include "mockCatalogService.h"
#include "tep.h"
#include <iomanip>
#include <iomanip>
#include <iostream>
#include <iostream>
#include <map>
#include <map>
#include "tdatablock.h"
#include "tname.h"
#include "tname.h"
#include "ttypes.h"
#include "ttypes.h"
...
...
source/libs/qworker/test/qworkerTests.cpp
浏览文件 @
92da01a8
...
@@ -29,18 +29,17 @@
...
@@ -29,18 +29,17 @@
#include "os.h"
#include "os.h"
#include "taos.h"
#include "addr_any.h"
#include "tdef.h"
#include "dataSinkMgt.h"
#include "tvariant.h"
#include "executor.h"
#include "tep.h"
#include "trpc.h"
#include "planner.h"
#include "planner.h"
#include "qworker.h"
#include "qworker.h"
#include "stub.h"
#include "stub.h"
#include "addr_any.h"
#include "taos.h"
#include "executor.h"
#include "tdatablock.h"
#include "dataSinkMgt.h"
#include "tdef.h"
#include "trpc.h"
#include "tvariant.h"
namespace
{
namespace
{
...
...
source/libs/scalar/inc/filterInt.h
浏览文件 @
92da01a8
...
@@ -20,13 +20,13 @@
...
@@ -20,13 +20,13 @@
extern
"C"
{
extern
"C"
{
#endif
#endif
#include "query.h"
#include "querynodes.h"
#include "scalar.h"
#include "tcommon.h"
#include "tdatablock.h"
#include "thash.h"
#include "thash.h"
#include "tname.h"
#include "tname.h"
#include "tcommon.h"
#include "scalar.h"
#include "querynodes.h"
#include "query.h"
#include "tep.h"
#define FILTER_DEFAULT_GROUP_SIZE 4
#define FILTER_DEFAULT_GROUP_SIZE 4
#define FILTER_DEFAULT_UNIT_SIZE 4
#define FILTER_DEFAULT_UNIT_SIZE 4
...
...
source/libs/scalar/src/filter.c
浏览文件 @
92da01a8
...
@@ -16,11 +16,11 @@
...
@@ -16,11 +16,11 @@
#include <tlog.h>
#include <tlog.h>
#include "thash.h"
#include "thash.h"
//#include "queryLog.h"
//#include "queryLog.h"
#include "
tcompare
.h"
#include "
filter
.h"
#include "filterInt.h"
#include "filterInt.h"
#include "sclInt.h"
#include "sclInt.h"
#include "
filter
.h"
#include "
tcompare
.h"
#include "t
ep
.h"
#include "t
datablock
.h"
OptrStr
gOptrStr
[]
=
{
OptrStr
gOptrStr
[]
=
{
{
0
,
"invalid"
},
{
0
,
"invalid"
},
...
...
source/libs/scalar/src/scalar.c
浏览文件 @
92da01a8
#include "nodes.h"
#include "tcommon.h"
#include "querynodes.h"
#include "function.h"
#include "function.h"
#include "functionMgt.h"
#include "functionMgt.h"
#include "sclvector.h"
#include "nodes.h"
#include "querynodes.h"
#include "sclInt.h"
#include "sclInt.h"
#include "tep.h"
#include "sclvector.h"
#include "tcommon.h"
#include "tdatablock.h"
int32_t
scalarGetOperatorParamNum
(
EOperatorType
type
)
{
int32_t
scalarGetOperatorParamNum
(
EOperatorType
type
)
{
if
(
OP_TYPE_IS_NULL
==
type
||
OP_TYPE_IS_NOT_NULL
==
type
||
OP_TYPE_IS_TRUE
==
type
||
OP_TYPE_IS_NOT_TRUE
==
type
if
(
OP_TYPE_IS_NULL
==
type
||
OP_TYPE_IS_NOT_NULL
==
type
||
OP_TYPE_IS_TRUE
==
type
||
OP_TYPE_IS_NOT_TRUE
==
type
...
...
source/libs/scalar/src/sclvector.c
浏览文件 @
92da01a8
...
@@ -15,15 +15,15 @@
...
@@ -15,15 +15,15 @@
#include "os.h"
#include "os.h"
#include "ttypes.h"
#include "filter.h"
#include "sclvector.h"
#include "tcompare.h"
#include "querynodes.h"
#include "filterInt.h"
#include "filterInt.h"
#include "query.h"
#include "query.h"
#include "querynodes.h"
#include "sclInt.h"
#include "sclInt.h"
#include "tep.h"
#include "sclvector.h"
#include "filter.h"
#include "tcompare.h"
#include "tdatablock.h"
#include "ttypes.h"
//GET_TYPED_DATA(v, double, pRight->type, (char *)&((right)[i]));
//GET_TYPED_DATA(v, double, pRight->type, (char *)&((right)[i]));
...
...
source/libs/scalar/test/filter/filterTests.cpp
浏览文件 @
92da01a8
...
@@ -29,16 +29,16 @@
...
@@ -29,16 +29,16 @@
#include "os.h"
#include "os.h"
#include "taos.h"
#include "tdef.h"
#include "tvariant.h"
#include "tep.h"
#include "stub.h"
#include "addr_any.h"
#include "addr_any.h"
#include "
scala
r.h"
#include "
filte
r.h"
#include "nodes.h"
#include "nodes.h"
#include "scalar.h"
#include "stub.h"
#include "taos.h"
#include "tdatablock.h"
#include "tdef.h"
#include "tlog.h"
#include "tlog.h"
#include "
filter
.h"
#include "
tvariant
.h"
namespace
{
namespace
{
...
...
source/libs/scalar/test/scalar/scalarTests.cpp
浏览文件 @
92da01a8
...
@@ -29,15 +29,15 @@
...
@@ -29,15 +29,15 @@
#include "os.h"
#include "os.h"
#include "taos.h"
#include "tdef.h"
#include "tvariant.h"
#include "tep.h"
#include "stub.h"
#include "addr_any.h"
#include "addr_any.h"
#include "scalar.h"
#include "nodes.h"
#include "nodes.h"
#include "scalar.h"
#include "stub.h"
#include "taos.h"
#include "tdatablock.h"
#include "tdef.h"
#include "tlog.h"
#include "tlog.h"
#include "tvariant.h"
namespace
{
namespace
{
...
...
source/libs/scheduler/test/schedulerTests.cpp
浏览文件 @
92da01a8
...
@@ -19,13 +19,13 @@
...
@@ -19,13 +19,13 @@
#include "os.h"
#include "os.h"
#include "taos.h"
#include "tdef.h"
#include "tvariant.h"
#include "catalog.h"
#include "catalog.h"
#include "scheduler.h"
#include "scheduler.h"
#include "tep.h"
#include "taos.h"
#include "tdatablock.h"
#include "tdef.h"
#include "trpc.h"
#include "trpc.h"
#include "tvariant.h"
#pragma GCC diagnostic push
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wwrite-strings"
#pragma GCC diagnostic ignored "-Wwrite-strings"
...
...
source/libs/sync/src/syncIO.c
浏览文件 @
92da01a8
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
*/
*/
#include "syncIO.h"
#include "syncIO.h"
#include <t
ep
.h>
#include <t
datablock
.h>
#include "syncOnMessage.h"
#include "syncOnMessage.h"
#include "tglobal.h"
#include "tglobal.h"
#include "ttimer.h"
#include "ttimer.h"
...
...
source/libs/transport/test/pushClient.c
浏览文件 @
92da01a8
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
*/
*/
#include <sys/time.h>
#include <sys/time.h>
#include <t
ep
.h>
#include <t
datablock
.h>
#include "os.h"
#include "os.h"
#include "rpcLog.h"
#include "rpcLog.h"
#include "taoserror.h"
#include "taoserror.h"
...
...
source/libs/transport/test/rclient.c
浏览文件 @
92da01a8
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
*/
*/
#include <sys/time.h>
#include <sys/time.h>
#include <t
ep
.h>
#include <t
datablock
.h>
#include "os.h"
#include "os.h"
#include "rpcLog.h"
#include "rpcLog.h"
#include "taoserror.h"
#include "taoserror.h"
...
...
source/libs/transport/test/syncClient.c
浏览文件 @
92da01a8
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
*/
*/
#include <sys/time.h>
#include <sys/time.h>
#include <t
ep
.h>
#include <t
datablock
.h>
#include "os.h"
#include "os.h"
#include "rpcLog.h"
#include "rpcLog.h"
#include "taoserror.h"
#include "taoserror.h"
...
...
source/libs/transport/test/transUT.cc
浏览文件 @
92da01a8
...
@@ -15,10 +15,10 @@
...
@@ -15,10 +15,10 @@
#include <gtest/gtest.h>
#include <gtest/gtest.h>
#include <cstdio>
#include <cstdio>
#include <cstring>
#include <cstring>
#include "t
ep
.h"
#include "t
datablock
.h"
#include "tglobal.h"
#include "tglobal.h"
#include "trpc.h"
#include "tlog.h"
#include "tlog.h"
#include "trpc.h"
using
namespace
std
;
using
namespace
std
;
const
char
*
label
=
"APP"
;
const
char
*
label
=
"APP"
;
...
...
source/util/src/thash.c
浏览文件 @
92da01a8
...
@@ -36,25 +36,35 @@
...
@@ -36,25 +36,35 @@
tfree(_n); \
tfree(_n); \
} while (0);
} while (0);
struct
SHashNode
{
SHashNode
*
next
;
uint32_t
hashVal
;
// the hash value of key
uint32_t
dataLen
;
// length of data
uint32_t
keyLen
;
// length of the key
uint16_t
refCount
;
// reference count
int8_t
removed
;
// flag to indicate removed
char
data
[];
};
typedef
struct
SHashEntry
{
typedef
struct
SHashEntry
{
int32_t
num
;
// number of elements in current entry
int32_t
num
;
// number of elements in current entry
SRWLatch
latch
;
// entry latch
SRWLatch
latch
;
// entry latch
SHashNode
*
next
;
SHashNode
*
next
;
}
SHashEntry
;
}
SHashEntry
;
typedef
struct
SHashObj
{
struct
SHashObj
{
SHashEntry
**
hashList
;
SHashEntry
**
hashList
;
size_t
capacity
;
// number of slots
size_t
capacity
;
// number of slots
size_t
size
;
// number of elements in hash table
size_t
size
;
// number of elements in hash table
_hash_fn_t
hashFp
;
// hash function
_hash_fn_t
hashFp
;
// hash function
_equal_fn_t
equalFp
;
// equal function
_equal_fn_t
equalFp
;
// equal function
_hash_free_fn_t
freeFp
;
// hash node free callback function
_hash_free_fn_t
freeFp
;
// hash node free callback function
SRWLatch
lock
;
// read-write spin lock
SRWLatch
lock
;
// read-write spin lock
SHashLockTypeE
type
;
// lock type
SHashLockTypeE
type
;
// lock type
bool
enableUpdate
;
// enable update
bool
enableUpdate
;
// enable update
SArray
*
pMemBlock
;
// memory block allocated for SHashEntry
SArray
*
pMemBlock
;
// memory block allocated for SHashEntry
_hash_before_fn_t
callbackFp
;
// function invoked before return the value to caller
_hash_before_fn_t
callbackFp
;
// function invoked before return the value to caller
}
SHashObj
;
};
/*
/*
* Function definition
* Function definition
...
@@ -367,7 +377,7 @@ int32_t taosHashPut(SHashObj *pHashObj, const void *key, size_t keyLen, void *da
...
@@ -367,7 +377,7 @@ int32_t taosHashPut(SHashObj *pHashObj, const void *key, size_t keyLen, void *da
// enable resize
// enable resize
taosHashRUnlock
(
pHashObj
);
taosHashRUnlock
(
pHashObj
);
return
pHashObj
->
enableUpdate
?
0
:
-
1
;
return
pHashObj
->
enableUpdate
?
0
:
-
2
;
}
}
}
}
...
@@ -464,7 +474,7 @@ void* taosHashGetImpl(SHashObj *pHashObj, const void *key, size_t keyLen, void**
...
@@ -464,7 +474,7 @@ void* taosHashGetImpl(SHashObj *pHashObj, const void *key, size_t keyLen, void**
return
data
;
return
data
;
}
}
int32_t
taosHashRemove
WithData
(
SHashObj
*
pHashObj
,
const
void
*
key
,
size_t
keyLen
,
void
*
data
,
size_t
dsize
)
{
int32_t
taosHashRemove
(
SHashObj
*
pHashObj
,
const
void
*
key
,
size_t
keyLen
)
{
if
(
pHashObj
==
NULL
||
taosHashTableEmpty
(
pHashObj
)
||
key
==
NULL
||
keyLen
==
0
)
{
if
(
pHashObj
==
NULL
||
taosHashTableEmpty
(
pHashObj
)
||
key
==
NULL
||
keyLen
==
0
)
{
return
-
1
;
return
-
1
;
}
}
...
@@ -507,8 +517,6 @@ int32_t taosHashRemoveWithData(SHashObj *pHashObj, const void *key, size_t keyLe
...
@@ -507,8 +517,6 @@ int32_t taosHashRemoveWithData(SHashObj *pHashObj, const void *key, size_t keyLe
prevNode
->
next
=
pNode
->
next
;
prevNode
->
next
=
pNode
->
next
;
}
}
if
(
data
)
memcpy
(
data
,
GET_HASH_NODE_DATA
(
pNode
),
dsize
);
pe
->
num
--
;
pe
->
num
--
;
atomic_sub_fetch_64
(
&
pHashObj
->
size
,
1
);
atomic_sub_fetch_64
(
&
pHashObj
->
size
,
1
);
FREE_HASH_NODE
(
pNode
);
FREE_HASH_NODE
(
pNode
);
...
@@ -525,10 +533,6 @@ int32_t taosHashRemoveWithData(SHashObj *pHashObj, const void *key, size_t keyLe
...
@@ -525,10 +533,6 @@ int32_t taosHashRemoveWithData(SHashObj *pHashObj, const void *key, size_t keyLe
return
code
;
return
code
;
}
}
int32_t
taosHashRemove
(
SHashObj
*
pHashObj
,
const
void
*
key
,
size_t
keyLen
)
{
return
taosHashRemoveWithData
(
pHashObj
,
key
,
keyLen
,
NULL
,
0
);
}
void
taosHashClear
(
SHashObj
*
pHashObj
)
{
void
taosHashClear
(
SHashObj
*
pHashObj
)
{
if
(
pHashObj
==
NULL
)
{
if
(
pHashObj
==
NULL
)
{
return
;
return
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录