Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
野花太放肆
oceanbase
提交
d4d0b1d1
O
oceanbase
项目概览
野花太放肆
/
oceanbase
与 Fork 源项目一致
Fork自
oceanbase / oceanbase
通知
1
Star
1
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,发现更多精彩内容 >>
提交
d4d0b1d1
编写于
3月 27, 2023
作者:
Z
zzg19950727
提交者:
ob-robot
3月 27, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix set NLJ filter bug
上级
d783084a
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
19 addition
and
20 deletion
+19
-20
src/sql/optimizer/ob_join_order.cpp
src/sql/optimizer/ob_join_order.cpp
+19
-20
未找到文件。
src/sql/optimizer/ob_join_order.cpp
浏览文件 @
d4d0b1d1
...
...
@@ -8430,33 +8430,32 @@ int ObJoinOrder::set_nl_filters(JoinPath *join_path,
if (OB_ISNULL(join_path) || OB_ISNULL(right_path)) {
ret = OB_INVALID_ARGUMENT;
LOG_WARN("get unexpected null", K(join_path), K(right_path), K(ret));
} else if (IS_OUTER_OR_CONNECT_BY_JOIN(join_type)) {
if (OB_FAIL(append_array_no_dup(join_path->filter_, where_conditions))) {
LOG_WARN("failed to append conditions", K(ret));
}
for (int64_t i = 0; OB_SUCC(ret) && i < on_conditions.count(); ++i) {
if (right_path->is_inner_path() && //如果是条件下降的NL
ObOptimizerUtil::find_item(right_path->pushdown_filters_, on_conditions.at(i))) {
/*do nothing*/
} else if (OB_FAIL(join_path->other_join_conditions_.push_back(on_conditions.at(i)))) { //未下降的nl条件
LOG_WARN("failed to push back conditions", K(ret));
}
}
} else {
//首先处理where条件
if (OB_FAIL(append_array_no_dup(join_path->other_join_conditions_, on_conditions))) {
LOG_WARN("failed to append conditions", K(ret));
}
for (int64_t i = 0; OB_SUCC(ret) && i < where_conditions.count(); ++i) {
//只有能在本级处理的qual才能放在join条件里,处理AB时,遇到a+b=c条件是不能放在本级join条件里的
if (OB_ISNULL(where_conditions.at(i))) {
ret = OB_ERR_NULL_VALUE;
LOG_WARN("raw expr is null", K(ret));
} else if (where_conditions.at(i)->get_relation_ids().is_subset(get_tables())) {
if (right_path->is_inner_path() && //如果是条件下降的NL
} else if (right_path->is_inner_path() && //如果是条件下降的NL
ObOptimizerUtil::find_item(right_path->pushdown_filters_, where_conditions.at(i))) {
/*do nothing*/
} else { //未下降的nl条件
if (IS_OUTER_OR_CONNECT_BY_JOIN(join_type)) { //如果是外连接,where条件只能作为普通的filter
ret = join_path->filter_.push_back(where_conditions.at(i));
} else { //如果不是外连接,where条件只能作为join filter
ret = join_path->other_join_conditions_.push_back(where_conditions.at(i));
}
}
} else { /*不能在本级join中处理的qual跳过*/ }
}
//处理on条件(这时是在处理OJ)
for (int64_t i = 0; OB_SUCC(ret) && i < on_conditions.count(); ++i) {
if (right_path->is_inner_path() && //如果是条件下降的NL
ObOptimizerUtil::find_item(right_path->pushdown_filters_, on_conditions.at(i))) {
/*do nothing*/
} else { //未下降的nl条件
ret = join_path->other_join_conditions_.push_back(on_conditions.at(i));//on条件必须放在join层
} else if (OB_FAIL(join_path->other_join_conditions_.push_back(where_conditions.at(i)))) { //未下降的nl条件
LOG_WARN("failed to push back conditions", K(ret));
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录