Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
9cbd8c7b
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看板
提交
9cbd8c7b
编写于
7月 28, 2022
作者:
S
slzhou@taodata.com
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: fix bugs related to join and nested query
上级
00fee07e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
18 addition
and
8 deletion
+18
-8
source/libs/executor/src/timewindowoperator.c
source/libs/executor/src/timewindowoperator.c
+17
-7
tests/system-test/2-query/join.py
tests/system-test/2-query/join.py
+1
-1
未找到文件。
source/libs/executor/src/timewindowoperator.c
浏览文件 @
9cbd8c7b
...
...
@@ -2098,9 +2098,11 @@ static void genInterpolationResult(STimeSliceOperatorInfo* pSliceInfo, SExprSupp
SColumnInfoData
*
pDst
=
taosArrayGet
(
pResBlock
->
pDataBlock
,
dstSlot
);
switch
(
pSliceInfo
->
fillType
)
{
case
TSDB_FILL_NULL
:
case
TSDB_FILL_NULL
:
{
colDataAppendNULL
(
pDst
,
rows
);
pResBlock
->
info
.
rows
+=
1
;
break
;
}
case
TSDB_FILL_SET_VALUE
:
{
SVariant
*
pVar
=
&
pSliceInfo
->
pFillColInfo
[
j
].
fillVal
;
...
...
@@ -2118,9 +2120,11 @@ static void genInterpolationResult(STimeSliceOperatorInfo* pSliceInfo, SExprSupp
GET_TYPED_DATA
(
v
,
int64_t
,
pVar
->
nType
,
&
pVar
->
i
);
colDataAppend
(
pDst
,
rows
,
(
char
*
)
&
v
,
false
);
}
}
break
;
pResBlock
->
info
.
rows
+=
1
;
break
;
}
case
TSDB_FILL_LINEAR
:
case
TSDB_FILL_LINEAR
:
{
#if 0
if (pCtx->start.key == INT64_MIN || pCtx->start.key > pCtx->startTs
|| pCtx->end.key == INT64_MIN || pCtx->end.key < pCtx->startTs) {
...
...
@@ -2151,17 +2155,22 @@ static void genInterpolationResult(STimeSliceOperatorInfo* pSliceInfo, SExprSupp
}
}
#endif
// TODO: pResBlock->info.rows += 1;
break
;
}
case
TSDB_FILL_PREV
:
{
SGroupKeys
*
pkey
=
taosArrayGet
(
pSliceInfo
->
pPrevRow
,
srcSlot
);
colDataAppend
(
pDst
,
rows
,
pkey
->
pData
,
false
);
}
break
;
pResBlock
->
info
.
rows
+=
1
;
break
;
}
case
TSDB_FILL_NEXT
:
{
char
*
p
=
colDataGetData
(
pSrc
,
rowIndex
);
colDataAppend
(
pDst
,
rows
,
p
,
colDataIsNull_s
(
pSrc
,
rowIndex
));
}
break
;
pResBlock
->
info
.
rows
+=
1
;
break
;
}
case
TSDB_FILL_NONE
:
default:
...
...
@@ -2169,7 +2178,6 @@ static void genInterpolationResult(STimeSliceOperatorInfo* pSliceInfo, SExprSupp
}
}
pResBlock
->
info
.
rows
+=
1
;
}
static
int32_t
initPrevRowsKeeper
(
STimeSliceOperatorInfo
*
pInfo
,
SSDataBlock
*
pBlock
)
{
...
...
@@ -2221,6 +2229,8 @@ static SSDataBlock* doTimeslice(SOperatorInfo* pOperator) {
SInterval
*
pInterval
=
&
pSliceInfo
->
interval
;
SOperatorInfo
*
downstream
=
pOperator
->
pDownstream
[
0
];
blockDataCleanup
(
pResBlock
);
int32_t
numOfRows
=
0
;
while
(
1
)
{
SSDataBlock
*
pBlock
=
downstream
->
fpSet
.
getNextFn
(
downstream
);
...
...
tests/system-test/2-query/join.py
浏览文件 @
9cbd8c7b
...
...
@@ -377,7 +377,7 @@ class TDTestCase:
tdSql
.
query
(
"select ct1.c_int from db.ct1 as ct1 join db1.ct1 as cy1 on ct1.ts=cy1.ts"
)
tdSql
.
checkRows
(
self
.
rows
)
tdSql
.
query
(
"select ct1.c_int from db.stb1 as ct1 join db1.ct1 as cy1 on ct1.ts=cy1.ts"
)
tdSql
.
checkRows
(
self
.
rows
)
tdSql
.
checkRows
(
self
.
rows
+
int
(
self
.
rows
*
0.6
//
3
)
+
int
(
self
.
rows
*
0.8
//
4
)
)
tdSql
.
query
(
"select ct1.c_int from db.nt1 as ct1 join db1.nt1 as cy1 on ct1.ts=cy1.ts"
)
tdSql
.
checkRows
(
self
.
rows
+
3
)
tdSql
.
query
(
"select ct1.c_int from db.stb1 as ct1 join db1.stb1 as cy1 on ct1.ts=cy1.ts"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录