Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
caoersss
oceanbase
提交
3233a7d4
O
oceanbase
项目概览
caoersss
/
oceanbase
与 Fork 源项目一致
Fork自
oceanbase / oceanbase
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
oceanbase
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3233a7d4
编写于
3月 16, 2022
作者:
Z
zs0
提交者:
LINGuanRen
3月 16, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix optimize bugs
上级
5d8300be
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
25 addition
and
4 deletion
+25
-4
src/sql/optimizer/ob_log_distinct.cpp
src/sql/optimizer/ob_log_distinct.cpp
+16
-0
src/sql/optimizer/ob_log_distinct.h
src/sql/optimizer/ob_log_distinct.h
+1
-0
src/sql/optimizer/ob_logical_operator.cpp
src/sql/optimizer/ob_logical_operator.cpp
+8
-4
未找到文件。
src/sql/optimizer/ob_log_distinct.cpp
浏览文件 @
3233a7d4
...
...
@@ -370,5 +370,21 @@ int ObLogDistinct::generate_link_sql_pre(GenLinkStmtContext& link_ctx)
return
ret
;
}
int
ObLogDistinct
::
check_output_dep_specific
(
ObRawExprCheckDep
&
checker
)
{
int
ret
=
OB_SUCCESS
;
// distinct exprs
for
(
int64_t
i
=
0
;
OB_SUCC
(
ret
)
&&
i
<
distinct_exprs_
.
count
();
++
i
)
{
if
(
OB_ISNULL
(
distinct_exprs_
.
at
(
i
)))
{
ret
=
OB_ERR_UNEXPECTED
;
LOG_WARN
(
"distinct_exprs_.at(i) is null"
,
K
(
ret
),
K
(
i
));
}
else
if
(
OB_FAIL
(
checker
.
check
(
*
distinct_exprs_
.
at
(
i
))))
{
LOG_WARN
(
"failed to check distinct_exprs_.at(i)"
,
K
(
ret
),
K
(
i
));
}
else
{
}
}
return
ret
;
}
}
// namespace sql
}
// namespace oceanbase
src/sql/optimizer/ob_log_distinct.h
浏览文件 @
3233a7d4
...
...
@@ -90,6 +90,7 @@ public:
virtual
int
allocate_expr_pre
(
ObAllocExprContext
&
ctx
)
override
;
virtual
int
compute_op_ordering
()
override
;
virtual
int
generate_link_sql_pre
(
GenLinkStmtContext
&
link_ctx
)
override
;
virtual
int
check_output_dep_specific
(
ObRawExprCheckDep
&
checker
);
private:
common
::
ObSEArray
<
ObRawExpr
*
,
16
,
common
::
ModulePageAllocator
,
true
>
distinct_exprs_
;
...
...
src/sql/optimizer/ob_logical_operator.cpp
浏览文件 @
3233a7d4
...
...
@@ -1775,9 +1775,14 @@ int ObLogicalOperator::do_post_traverse_operation(const TraverseOp& op, void* ct
!
static_cast
<
ObSelectStmt
*>
(
get_stmt
())
->
need_temp_table_trans
()
&&
!
static_cast
<
ObSelectStmt
*>
(
get_stmt
())
->
is_temp_table
()
&&
get_stmt
()
->
has_order_by
()
&&
!
get_stmt
()
->
is_order_siblings
()
&&
log_op_def
::
LOG_SORT
!=
top
->
get_type
()
&&
AllocExchContext
::
DistrStat
::
DISTRIBUTED
==
alloc_exch_ctx
->
plan_type_
&&
OB_FAIL
(
allocate_stmt_order_by_above
(
top
)))
{
LOG_WARN
(
"failed to allocate stmt order by"
,
K
(
ret
));
AllocExchContext
::
DistrStat
::
DISTRIBUTED
==
alloc_exch_ctx
->
plan_type_
)
{
if
(
OB_FAIL
(
allocate_stmt_order_by_above
(
top
)))
{
LOG_WARN
(
"failed to allocate stmt order by"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
top
->
replace_generated_agg_expr
(
alloc_exch_ctx
->
group_push_down_replaced_exprs_
)))
{
LOG_WARN
(
"failed to replace generated agg expr"
,
K
(
ret
));
}
}
if
(
OB_FAIL
(
ret
))
{
}
else
if
(
NULL
==
top
->
get_parent
())
{
// this is the final root operator
ObExchangeInfo
exch_info
;
...
...
@@ -5216,7 +5221,6 @@ int ObLogicalOperator::allocate_dummy_output_access()
ObLogExchange
*
exchange_op
=
NULL
;
exchange_op
=
static_cast
<
ObLogExchange
*>
(
this
);
if
(
exchange_op
->
get_is_remote
()
&&
exchange_op
->
is_producer
())
{
// https://work.aone.alibaba-inc.com/issue/33487009
// 0. EXCHANGE IN REMOTE
// 1. EXCHANGE OUT REMOTE
// 2. TABLE SCAN / OTHERS
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录