Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
f45433df
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
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看板
提交
f45433df
编写于
10月 10, 2022
作者:
C
Cary Xu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: column support 63K and row support 64k
上级
e619a292
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
23 addition
and
23 deletion
+23
-23
src/common/inc/tdataformat.h
src/common/inc/tdataformat.h
+1
-1
src/query/inc/qExtbuffer.h
src/query/inc/qExtbuffer.h
+1
-1
src/query/inc/qPercentile.h
src/query/inc/qPercentile.h
+2
-2
src/query/inc/qScript.h
src/query/inc/qScript.h
+2
-2
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+2
-2
src/query/src/qExtbuffer.c
src/query/src/qExtbuffer.c
+4
-4
src/query/src/qFill.c
src/query/src/qFill.c
+2
-2
src/query/src/qPercentile.c
src/query/src/qPercentile.c
+1
-1
src/query/src/qScript.c
src/query/src/qScript.c
+4
-4
src/query/src/qSqlParser.c
src/query/src/qSqlParser.c
+2
-2
src/tsdb/inc/tsdbMeta.h
src/tsdb/inc/tsdbMeta.h
+2
-2
未找到文件。
src/common/inc/tdataformat.h
浏览文件 @
f45433df
...
...
@@ -55,7 +55,7 @@ extern "C" {
typedef
struct
{
int8_t
type
;
// Column type
int16_t
colId
;
// column ID
int16_t
bytes
;
// column bytes (restore to int16_t in case of misuse)
uint16_t
bytes
;
// column bytes
uint16_t
offset
;
// point offset in SDataRow after the header part.
}
STColumn
;
...
...
src/query/inc/qExtbuffer.h
浏览文件 @
f45433df
...
...
@@ -208,7 +208,7 @@ void tColModelCompact(SColumnModel *pModel, tFilePage *inputBuffer, int32_t maxE
void
tColModelErase
(
SColumnModel
*
pModel
,
tFilePage
*
inputBuffer
,
int32_t
maxCapacity
,
int32_t
s
,
int32_t
e
);
SSchema1
*
getColumnModelSchema
(
SColumnModel
*
pColumnModel
,
int32_t
index
);
int16_t
getColumnModelOffset
(
SColumnModel
*
pColumnModel
,
int32_t
index
);
u
int16_t
getColumnModelOffset
(
SColumnModel
*
pColumnModel
,
int32_t
index
);
typedef
struct
SSrcColumnInfo
{
int32_t
functionId
;
...
...
src/query/inc/qPercentile.h
浏览文件 @
f45433df
...
...
@@ -54,7 +54,7 @@ typedef int32_t (*__perc_hash_func_t)(struct tMemBucket *pBucket, const void *va
typedef
struct
tMemBucket
{
int16_t
numOfSlots
;
int16_t
type
;
int16_t
bytes
;
uint16_t
bytes
;
int32_t
total
;
int32_t
elemPerPage
;
// number of elements for each object
int32_t
maxCapacity
;
// maximum allowed number of elements that can be sort directly to get the result
...
...
@@ -68,7 +68,7 @@ typedef struct tMemBucket {
__perc_hash_func_t
hashFunc
;
}
tMemBucket
;
tMemBucket
*
tMemBucketCreate
(
int16_t
nElemSize
,
int16_t
dataType
,
double
minval
,
double
maxval
);
tMemBucket
*
tMemBucketCreate
(
u
int16_t
nElemSize
,
int16_t
dataType
,
double
minval
,
double
maxval
);
void
tMemBucketDestroy
(
tMemBucket
*
pBucket
);
...
...
src/query/inc/qScript.h
浏览文件 @
f45433df
...
...
@@ -62,8 +62,8 @@ typedef struct ScriptCtx {
}
ScriptCtx
;
int
taosLoadScriptInit
(
void
*
pInit
);
void
taosLoadScriptNormal
(
void
*
pInit
,
char
*
pInput
,
int16_t
iType
,
int16_t
iBytes
,
int32_t
numOfRows
,
int64_t
*
ptsList
,
int64_t
key
,
char
*
pOutput
,
char
*
ptsOutput
,
int32_t
*
numOfOutput
,
int16_t
oType
,
int16_t
oBytes
);
void
taosLoadScriptNormal
(
void
*
pInit
,
char
*
pInput
,
int16_t
iType
,
u
int16_t
iBytes
,
int32_t
numOfRows
,
int64_t
*
ptsList
,
int64_t
key
,
char
*
pOutput
,
char
*
ptsOutput
,
int32_t
*
numOfOutput
,
int16_t
oType
,
u
int16_t
oBytes
);
void
taosLoadScriptFinalize
(
void
*
pInit
,
int64_t
key
,
char
*
pOutput
,
int32_t
*
output
);
void
taosLoadScriptMerge
(
void
*
pCtx
,
char
*
data
,
int32_t
numOfRows
,
char
*
dataOutput
,
int32_t
*
numOfOutput
);
void
taosLoadScriptDestroy
(
void
*
pInit
);
...
...
src/query/src/qExecutor.c
浏览文件 @
f45433df
...
...
@@ -206,7 +206,7 @@ static void getNextTimeWindow(SQueryAttr* pQueryAttr, STimeWindow* tw) {
tw
->
ekey
-=
1
;
}
static
void
doSetTagValueToResultBuf
(
char
*
output
,
const
char
*
val
,
int16_t
type
,
int16_t
bytes
);
static
void
doSetTagValueToResultBuf
(
char
*
output
,
const
char
*
val
,
int16_t
type
,
u
int16_t
bytes
);
static
void
setResultOutputBuf
(
SQueryRuntimeEnv
*
pRuntimeEnv
,
SResultRow
*
pResult
,
SQLFunctionCtx
*
pCtx
,
int32_t
numOfCols
,
int32_t
*
rowCellInfoOffset
);
...
...
@@ -10531,7 +10531,7 @@ bool doBuildResCheck(SQInfo* pQInfo) {
return
buildRes
;
}
static
void
doSetTagValueToResultBuf
(
char
*
output
,
const
char
*
val
,
int16_t
type
,
int16_t
bytes
)
{
static
void
doSetTagValueToResultBuf
(
char
*
output
,
const
char
*
val
,
int16_t
type
,
u
int16_t
bytes
)
{
if
(
val
==
NULL
)
{
setNull
(
output
,
type
,
bytes
);
return
;
...
...
src/query/src/qExtbuffer.c
浏览文件 @
f45433df
...
...
@@ -731,8 +731,8 @@ static void columnwiseMergeSortImpl(tOrderDescriptor *pDescriptor, int32_t numOf
char
*
p
=
NULL
;
for
(
int32_t
i
=
0
;
i
<
numOfCols
;
++
i
)
{
int16_t
colOffset
=
getColumnModelOffset
(
pDescriptor
->
pColumnModel
,
i
);
int32_t
colBytes
=
pDescriptor
->
pColumnModel
->
pFields
[
i
].
field
.
bytes
;
u
int16_t
colOffset
=
getColumnModelOffset
(
pDescriptor
->
pColumnModel
,
i
);
int32_t
colBytes
=
pDescriptor
->
pColumnModel
->
pFields
[
i
].
field
.
bytes
;
// make sure memory buffer is enough
if
(
prevLength
<
colBytes
)
{
char
*
tmp
=
realloc
(
p
,
colBytes
*
numOfRows
);
...
...
@@ -1181,7 +1181,7 @@ SSchema1* getColumnModelSchema(SColumnModel *pColumnModel, int32_t idx) {
return
&
pColumnModel
->
pFields
[
idx
].
field
;
}
int16_t
getColumnModelOffset
(
SColumnModel
*
pColumnModel
,
int32_t
idx
)
{
u
int16_t
getColumnModelOffset
(
SColumnModel
*
pColumnModel
,
int32_t
idx
)
{
assert
(
pColumnModel
!=
NULL
&&
idx
>=
0
&&
idx
<
pColumnModel
->
numOfCols
);
return
pColumnModel
->
pFields
[
idx
].
offset
;
}
...
...
@@ -1197,7 +1197,7 @@ void tColModelErase(SColumnModel *pModel, tFilePage *inputBuffer, int32_t blockC
/* start from the second column */
for
(
int32_t
i
=
0
;
i
<
pModel
->
numOfCols
;
++
i
)
{
int16_t
offset
=
getColumnModelOffset
(
pModel
,
i
);
u
int16_t
offset
=
getColumnModelOffset
(
pModel
,
i
);
SSchema1
*
pSchema
=
getColumnModelSchema
(
pModel
,
i
);
char
*
startPos
=
inputBuffer
->
data
+
offset
*
blockCapacity
+
s
*
pSchema
->
bytes
;
...
...
src/query/src/qFill.c
浏览文件 @
f45433df
...
...
@@ -108,8 +108,8 @@ static void doFillOneRowResult(SFillInfo* pFillInfo, void** data, char** srcData
continue
;
}
int16_t
type
=
pCol
->
col
.
type
;
int16_t
bytes
=
pCol
->
col
.
bytes
;
int16_t
type
=
pCol
->
col
.
type
;
u
int16_t
bytes
=
pCol
->
col
.
bytes
;
char
*
val1
=
elePtrAt
(
data
[
i
],
pCol
->
col
.
bytes
,
idx
);
if
(
type
==
TSDB_DATA_TYPE_BINARY
||
type
==
TSDB_DATA_TYPE_NCHAR
||
type
==
TSDB_DATA_TYPE_BOOL
)
{
...
...
src/query/src/qPercentile.c
浏览文件 @
f45433df
...
...
@@ -222,7 +222,7 @@ static void resetSlotInfo(tMemBucket* pBucket) {
}
}
tMemBucket
*
tMemBucketCreate
(
int16_t
nElemSize
,
int16_t
dataType
,
double
minval
,
double
maxval
)
{
tMemBucket
*
tMemBucketCreate
(
u
int16_t
nElemSize
,
int16_t
dataType
,
double
minval
,
double
maxval
)
{
tMemBucket
*
pBucket
=
(
tMemBucket
*
)
calloc
(
1
,
sizeof
(
tMemBucket
));
if
(
pBucket
==
NULL
)
{
return
NULL
;
...
...
src/query/src/qScript.c
浏览文件 @
f45433df
...
...
@@ -30,7 +30,7 @@ static void destroyLuaEnv(lua_State *state);
static
void
destroyScriptEnv
(
ScriptEnv
*
pEnv
);
static
void
luaValueToTaosType
(
lua_State
*
lua
,
char
*
interBuf
,
int32_t
*
numOfOutput
,
int16_t
oType
,
int16_t
oBytes
);
static
void
luaValueToTaosType
(
lua_State
*
lua
,
char
*
interBuf
,
int32_t
*
numOfOutput
,
int16_t
oType
,
u
int16_t
oBytes
);
static
void
taosValueToLuaType
(
lua_State
*
lua
,
int32_t
type
,
char
*
val
);
static
bool
hasBaseFuncDefinedInScript
(
lua_State
*
lua
,
const
char
*
funcPrefix
,
int32_t
len
);
...
...
@@ -106,8 +106,8 @@ int taosLoadScriptInit(void* pInit) {
lua_setglobal
(
lua
,
"global"
);
return
0
;
}
void
taosLoadScriptNormal
(
void
*
pInit
,
char
*
pInput
,
int16_t
iType
,
int16_t
iBytes
,
int32_t
numOfRows
,
int64_t
*
ptsList
,
int64_t
key
,
char
*
pOutput
,
char
*
ptsOutput
,
int32_t
*
numOfOutput
,
int16_t
oType
,
int16_t
oBytes
)
{
void
taosLoadScriptNormal
(
void
*
pInit
,
char
*
pInput
,
int16_t
iType
,
u
int16_t
iBytes
,
int32_t
numOfRows
,
int64_t
*
ptsList
,
int64_t
key
,
char
*
pOutput
,
char
*
ptsOutput
,
int32_t
*
numOfOutput
,
int16_t
oType
,
u
int16_t
oBytes
)
{
ScriptCtx
*
pCtx
=
pInit
;
char
funcName
[
MAX_FUNC_NAME
+
1
]
=
{
0
};
// one-more-space-for-null-terminator
int
n
=
snprintf
(
funcName
,
sizeof
(
funcName
),
"%s_add"
,
pCtx
->
funcName
);
...
...
@@ -248,7 +248,7 @@ void destroyScriptCtx(void *pCtx) {
free
(
pCtx
);
}
void
luaValueToTaosType
(
lua_State
*
lua
,
char
*
interBuf
,
int32_t
*
numOfOutput
,
int16_t
oType
,
int16_t
oBytes
)
{
void
luaValueToTaosType
(
lua_State
*
lua
,
char
*
interBuf
,
int32_t
*
numOfOutput
,
int16_t
oType
,
u
int16_t
oBytes
)
{
int
t
=
lua_type
(
lua
,
-
1
);
int32_t
sz
=
0
;
switch
(
t
)
{
...
...
src/query/src/qSqlParser.c
浏览文件 @
f45433df
...
...
@@ -1045,7 +1045,7 @@ void tSetColumnType(TAOS_FIELD *pField, SStrToken *type) {
}
else
{
bytes
=
bytes
*
TSDB_NCHAR_SIZE
+
VARSTR_HEADER_SIZE
;
}
pField
->
bytes
=
(
int16_t
)
bytes
;
pField
->
bytes
=
(
u
int16_t
)
bytes
;
}
}
else
if
(
i
==
TSDB_DATA_TYPE_BINARY
)
{
/* for binary, the TOKENTYPE is the length of binary */
...
...
@@ -1060,7 +1060,7 @@ void tSetColumnType(TAOS_FIELD *pField, SStrToken *type) {
bytes
+=
VARSTR_HEADER_SIZE
;
}
pField
->
bytes
=
(
int16_t
)
bytes
;
pField
->
bytes
=
(
u
int16_t
)
bytes
;
}
}
else
{
if
(
type
->
type
>
0
)
{
...
...
src/tsdb/inc/tsdbMeta.h
浏览文件 @
f45433df
...
...
@@ -20,8 +20,8 @@
#pragma pack (push,1)
typedef
struct
jsonMapValue
{
void
*
table
;
// STable *
int16_t
colId
;
// the json col ID.
void
*
table
;
// STable *
int16_t
colId
;
// the json col ID.
}
JsonMapValue
;
#pragma pack (pop)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录