Skip to content

Commit 9f5d9e8

Browse files
committed
add
1 parent 2a25f4c commit 9f5d9e8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/query/storages/fuse/src/table_functions/fuse_block.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ impl TableMetaFunc for FuseBlock {
7575
"virtual_column_size",
7676
TableDataType::Nullable(Box::new(TableDataType::Number(NumberDataType::UInt64))),
7777
),
78+
TableField::new(
79+
"block_stats_size",
80+
TableDataType::Nullable(Box::new(TableDataType::Number(NumberDataType::UInt64))),
81+
),
7882
])
7983
}
8084

@@ -99,6 +103,7 @@ impl TableMetaFunc for FuseBlock {
99103
let mut ngram_index_size = Vec::with_capacity(len);
100104
let mut vector_index_size = Vec::with_capacity(len);
101105
let mut virtual_column_size = Vec::with_capacity(len);
106+
let mut block_stats_size = Vec::with_capacity(len);
102107

103108
let segments_io = SegmentsIO::create(ctx.clone(), tbl.operator.clone(), tbl.schema());
104109

@@ -134,6 +139,7 @@ impl TableMetaFunc for FuseBlock {
134139
.as_ref()
135140
.map(|m| m.virtual_column_size),
136141
);
142+
block_stats_size.push(block.block_stats_meta.as_ref().map(|m| m.size));
137143

138144
num_rows += 1;
139145
if num_rows >= limit {
@@ -157,6 +163,7 @@ impl TableMetaFunc for FuseBlock {
157163
UInt64Type::from_opt_data(ngram_index_size).into(),
158164
UInt64Type::from_opt_data(vector_index_size).into(),
159165
UInt64Type::from_opt_data(virtual_column_size).into(),
166+
UInt64Type::from_opt_data(block_stats_size).into(),
160167
],
161168
num_rows,
162169
))

0 commit comments

Comments
 (0)