Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
oceanbase
oceanbase
提交
05d841b9
O
oceanbase
项目概览
oceanbase
/
oceanbase
2 年多 前同步成功
通知
263
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看板
提交
05d841b9
编写于
11月 12, 2025
作者:
J
JLY2015
提交者:
ob-robot
11月 12, 2025
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CP] [vctor index] fix show create table display index
上级
f25cb149
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
28 addition
and
1 deletion
+28
-1
src/share/schema/ob_schema_printer.cpp
src/share/schema/ob_schema_printer.cpp
+1
-1
src/share/vector_index/ob_vector_index_util.cpp
src/share/vector_index/ob_vector_index_util.cpp
+23
-0
src/share/vector_index/ob_vector_index_util.h
src/share/vector_index/ob_vector_index_util.h
+4
-0
未找到文件。
src/share/schema/ob_schema_printer.cpp
浏览文件 @
05d841b9
...
@@ -826,7 +826,7 @@ int ObSchemaPrinter::print_table_definition_indexes(const ObTableSchema &table_s
...
@@ -826,7 +826,7 @@ int ObSchemaPrinter::print_table_definition_indexes(const ObTableSchema &table_s
// Do not print global index.
// Do not print global index.
}
else
if
(
index_schema
->
is_built_in_index
())
{
}
else
if
(
index_schema
->
is_built_in_index
())
{
// For full-text or vector index search index, only inverted table can be printed, and others table will not be printed.
// For full-text or vector index search index, only inverted table can be printed, and others table will not be printed.
}
else
if
(
index_schema
->
is_vec_index
()
&&
index_schema
->
get_index_status
()
!=
INDEX_STATUS_AVAILABLE
)
{
}
else
if
(
index_schema
->
is_vec_index
()
&&
!
ObVectorIndexUtil
::
check_index_is_all_ready
(
schema_guard_
,
table_schema
,
*
index_schema
)
)
{
// Not show vec index which in unavaliable status
// Not show vec index which in unavaliable status
}
else
if
(
OB_FAIL
(
print_single_index_definition
(
index_schema
,
table_schema
,
arena_allocator
,
}
else
if
(
OB_FAIL
(
print_single_index_definition
(
index_schema
,
table_schema
,
arena_allocator
,
buf
,
buf_len
,
pos
,
is_unique_index
,
is_oracle_mode
,
false
,
sql_mode
,
tz_info
)))
{
buf
,
buf_len
,
pos
,
is_unique_index
,
is_oracle_mode
,
false
,
sql_mode
,
tz_info
)))
{
...
...
src/share/vector_index/ob_vector_index_util.cpp
浏览文件 @
05d841b9
...
@@ -4476,6 +4476,29 @@ int ObVectorIndexUtil::get_vector_index_column_name(
...
@@ -4476,6 +4476,29 @@ int ObVectorIndexUtil::get_vector_index_column_name(
return
ret
;
return
ret
;
}
}
bool
ObVectorIndexUtil
::
check_index_is_all_ready
(
ObSchemaGetterGuard
&
schema_guard
,
const
schema
::
ObTableSchema
&
table_schema
,
const
schema
::
ObTableSchema
&
index_schema
)
{
int
ret
=
OB_SUCCESS
;
bool
is_all_ready
=
false
;
ObArray
<
ObString
>
vec_column_names
;
if
(
index_schema
.
is_built_in_index
())
{
ret
=
OB_ERR_UNEXPECTED
;
LOG_WARN
(
"unexpected index type"
,
K
(
ret
),
K
(
index_schema
));
}
else
if
(
OB_FAIL
(
get_vector_index_column_name
(
table_schema
,
index_schema
,
vec_column_names
)))
{
LOG_WARN
(
"fail to get vector index column name"
,
K
(
ret
));
}
else
if
(
vec_column_names
.
count
()
<=
0
)
{
ret
=
OB_ERR_UNEXPECTED
;
LOG_WARN
(
"unexpected vec column count"
,
K
(
ret
),
K
(
index_schema
));
}
else
if
(
OB_FAIL
(
check_vector_index_by_column_name
(
schema_guard
,
table_schema
,
vec_column_names
.
at
(
0
),
is_all_ready
)))
{
LOG_WARN
(
"fail to check vector index by column name"
,
K
(
ret
),
K
(
vec_column_names
));
}
return
is_all_ready
;
}
bool
ObVectorIndexUtil
::
is_match_index_column_name
(
bool
ObVectorIndexUtil
::
is_match_index_column_name
(
const
schema
::
ObTableSchema
&
table_schema
,
const
schema
::
ObTableSchema
&
table_schema
,
const
schema
::
ObTableSchema
&
index_schema
,
const
schema
::
ObTableSchema
&
index_schema
,
...
...
src/share/vector_index/ob_vector_index_util.h
浏览文件 @
05d841b9
...
@@ -748,6 +748,10 @@ public:
...
@@ -748,6 +748,10 @@ public:
const
uint64_t
tenant_id
,
const
uint64_t
tenant_id
,
const
int64_t
tablet_row_count
,
const
int64_t
tablet_row_count
,
int64_t
&
estimate_memory
);
int64_t
&
estimate_memory
);
static
bool
check_index_is_all_ready
(
ObSchemaGetterGuard
&
schema_guard
,
const
schema
::
ObTableSchema
&
table_schema
,
const
schema
::
ObTableSchema
&
index_schema
);
static
int
alter_vec_aux_column_schema
(
const
ObTableSchema
&
aux_table_schema
,
static
int
alter_vec_aux_column_schema
(
const
ObTableSchema
&
aux_table_schema
,
const
ObColumnSchemaV2
&
new_column_schema
,
const
ObColumnSchemaV2
&
new_column_schema
,
ObColumnSchemaV2
&
new_aux_column_schema
);
ObColumnSchemaV2
&
new_aux_column_schema
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录