Skip to content

Commit 43a538f

Browse files
zhyassdantengsky
andauthored
refactor: Unified query for hilbert and linear clustering information (#17618)
* refactor: Unified query for hilbert and linear clustering information * make lint * fix * fix * fix * refactor: use variant column to unify the schema * fix: clustering_information related logic tests * fix * fix * fix test --------- Co-authored-by: dantengsky <[email protected]>
1 parent 08c4f54 commit 43a538f

File tree

16 files changed

+295
-446
lines changed

16 files changed

+295
-446
lines changed

src/query/service/src/table_functions/table_function_factory.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ use databend_common_storages_fuse::table_functions::FuseTimeTravelSizeFunc;
2929
use databend_common_storages_fuse::table_functions::FuseVacuumDropAggregatingIndex;
3030
use databend_common_storages_fuse::table_functions::FuseVacuumDropInvertedIndex;
3131
use databend_common_storages_fuse::table_functions::FuseVacuumTemporaryTable;
32-
use databend_common_storages_fuse::table_functions::HilbertClusteringInfoFunc;
3332
use databend_common_storages_fuse::table_functions::SetCacheCapacity;
3433
use databend_common_storages_fuse::table_functions::TableFunctionTemplate;
3534
use databend_common_storages_iceberg::IcebergInspectTable;
@@ -208,14 +207,6 @@ impl TableFunctionFactory {
208207
),
209208
);
210209

211-
creators.insert(
212-
"hilbert_clustering_information".to_string(),
213-
(
214-
next_id(),
215-
Arc::new(TableFunctionTemplate::<HilbertClusteringInfoFunc>::create),
216-
),
217-
);
218-
219210
creators.insert(
220211
"fuse_vacuum_temporary_table".to_string(),
221212
(

src/query/service/tests/it/storages/fuse/table_functions/clustering_information_table.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ async fn test_clustering_information_table_read() -> Result<()> {
3434
let qry = format!("insert into {}.{} values(1, (2, 3)),(2, (4, 6))", db, tbl);
3535
let _ = execute_query(ctx.clone(), qry.as_str()).await?;
3636
let expected = vec![
37-
"+----------+----------+----------+----------+----------+----------+---------------+",
38-
"| Column 0 | Column 1 | Column 2 | Column 3 | Column 4 | Column 5 | Column 6 |",
39-
"+----------+----------+----------+----------+----------+----------+---------------+",
40-
"| '(id)' | 'linear' | 1 | 0 | 0 | 1 | '{\"00001\":1}' |",
41-
"+----------+----------+----------+----------+----------+----------+---------------+",
37+
"+----------+----------+-----------------------------------------------------------------------------------------------------------------------------------+",
38+
"| Column 0 | Column 1 | Column 2 |",
39+
"+----------+----------+-----------------------------------------------------------------------------------------------------------------------------------+",
40+
"| '(id)' | 'linear' | '{\"average_depth\":1.0,\"average_overlaps\":0.0,\"block_depth_histogram\":{\"00001\":1},\"constant_block_count\":0,\"total_block_count\":1}' |",
41+
"+----------+----------+-----------------------------------------------------------------------------------------------------------------------------------+",
4242
];
4343

4444
let qry = format!(

0 commit comments

Comments
 (0)