Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
oceanbase
oceanbase
提交
f3d6b18e
O
oceanbase
项目概览
oceanbase
/
oceanbase
8 个月 前同步成功
通知
260
Star
6084
Fork
1301
代码
文件
提交
分支
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,体验更适合开发者的 AI 搜索 >>
提交
f3d6b18e
编写于
4月 23, 2024
作者:
T
Tyshawn
提交者:
ob-robot
4月 23, 2024
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[FTS][BUG.FIX] Fix both full-text and multi-value indexs in data table.
上级
8aade630
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
38 addition
and
5 deletion
+38
-5
src/sql/das/ob_das_dml_ctx_define.cpp
src/sql/das/ob_das_dml_ctx_define.cpp
+10
-1
src/sql/das/ob_das_domain_utils.cpp
src/sql/das/ob_das_domain_utils.cpp
+14
-0
src/sql/das/ob_das_domain_utils.h
src/sql/das/ob_das_domain_utils.h
+1
-0
src/sql/das/ob_das_update_op.cpp
src/sql/das/ob_das_update_op.cpp
+13
-4
未找到文件。
src/sql/das/ob_das_dml_ctx_define.cpp
浏览文件 @
f3d6b18e
...
...
@@ -234,7 +234,16 @@ void ObDASDMLIterator::set_ctdef(const ObDASDMLBaseCtDef *das_ctdef)
&
das_ctdef_
->
old_row_projector_
:
&
das_ctdef_
->
new_row_projector_
;
if
(
OB_NOT_NULL
(
domain_iter_
))
{
domain_iter_
->
set_ctdef
(
das_ctdef
,
row_projector_
);
if
(
!
das_ctdef
->
table_param_
.
get_data_table
().
is_domain_index
())
{
// This table isn't domain index, nothing to do.
}
else
if
(
domain_iter_
->
is_same_domain_type
(
das_ctdef
))
{
// The das_ctdef and das_ctdef_ are either full-text search or multi-value index.
domain_iter_
->
set_ctdef
(
das_ctdef
,
row_projector_
);
}
else
{
// need to reset domain iter
domain_iter_
->~
ObDomainDMLIterator
();
domain_iter_
=
nullptr
;
}
}
}
...
...
src/sql/das/ob_das_domain_utils.cpp
浏览文件 @
f3d6b18e
...
...
@@ -490,6 +490,20 @@ void ObDomainDMLIterator::set_ctdef(
row_projector_
=
row_projector
;
}
bool
ObDomainDMLIterator
::
is_same_domain_type
(
const
ObDASDMLBaseCtDef
*
das_ctdef
)
const
{
bool
is_same_domain_type
=
false
;
if
(
OB_NOT_NULL
(
das_ctdef
)
&&
OB_NOT_NULL
(
das_ctdef_
))
{
const
ObTableSchemaParam
&
table_param
=
das_ctdef
->
table_param_
.
get_data_table
();
const
ObTableSchemaParam
&
my_table_param
=
das_ctdef_
->
table_param_
.
get_data_table
();
if
((
table_param
.
is_fts_index
()
&&
my_table_param
.
is_fts_index
())
||
(
table_param
.
is_multivalue_index
()
&&
my_table_param
.
is_multivalue_index
()))
{
is_same_domain_type
=
true
;
}
}
return
is_same_domain_type
;
}
int
ObDomainDMLIterator
::
get_next_domain_row
(
ObNewRow
*&
row
)
{
int
ret
=
OB_SUCCESS
;
...
...
src/sql/das/ob_das_domain_utils.h
浏览文件 @
f3d6b18e
...
...
@@ -106,6 +106,7 @@ public:
void
set_ctdef
(
const
ObDASDMLBaseCtDef
*
das_ctdef
,
const
IntFixedArray
*
row_projector
);
void
set_row_projector
(
const
IntFixedArray
*
row_projector
)
{
row_projector_
=
row_projector
;
}
int
get_next_domain_row
(
ObNewRow
*&
row
);
bool
is_same_domain_type
(
const
ObDASDMLBaseCtDef
*
das_ctdef
)
const
;
TO_STRING_KV
(
K_
(
row_idx
),
K_
(
rows
),
KPC_
(
row_projector
),
KPC_
(
das_ctdef
),
K_
(
main_ctdef
));
protected:
...
...
src/sql/das/ob_das_update_op.cpp
浏览文件 @
f3d6b18e
...
...
@@ -73,10 +73,19 @@ public:
iter_has_built_
=
false
;
das_ctdef_
=
static_cast
<
const
ObDASUpdCtDef
*>
(
das_ctdef
);
if
(
OB_NOT_NULL
(
domain_iter_
))
{
domain_iter_
->
set_ctdef
(
das_ctdef_
,
&
(
got_old_row_
?
das_ctdef_
->
new_row_projector_
:
das_ctdef_
->
old_row_projector_
));
if
(
OB_FAIL
(
domain_iter_
->
rewind
()))
{
LOG_WARN
(
"fail to rewind for domain iterator"
,
K
(
ret
));
if
(
!
das_ctdef
->
table_param_
.
get_data_table
().
is_domain_index
())
{
// This table isn't domain index, nothing to do.
}
else
if
(
domain_iter_
->
is_same_domain_type
(
das_ctdef
))
{
// The das_ctdef and das_ctdef_ are either full-text search or multi-value index.
domain_iter_
->
set_ctdef
(
das_ctdef_
,
&
(
got_old_row_
?
das_ctdef_
->
new_row_projector_
:
das_ctdef_
->
old_row_projector_
));
if
(
OB_FAIL
(
domain_iter_
->
rewind
()))
{
LOG_WARN
(
"fail to rewind for domain iterator"
,
K
(
ret
));
}
}
else
{
// need to reset domain iter
domain_iter_
->~
ObDomainDMLIterator
();
domain_iter_
=
nullptr
;
}
}
return
ret
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录