File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
src/query/storages/fuse/src/table_functions Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,10 @@ impl TableMetaFunc for FuseBlock {
75
75
"virtual_column_size" ,
76
76
TableDataType :: Nullable ( Box :: new( TableDataType :: Number ( NumberDataType :: UInt64 ) ) ) ,
77
77
) ,
78
+ TableField :: new(
79
+ "block_stats_size" ,
80
+ TableDataType :: Nullable ( Box :: new( TableDataType :: Number ( NumberDataType :: UInt64 ) ) ) ,
81
+ ) ,
78
82
] )
79
83
}
80
84
@@ -99,6 +103,7 @@ impl TableMetaFunc for FuseBlock {
99
103
let mut ngram_index_size = Vec :: with_capacity ( len) ;
100
104
let mut vector_index_size = Vec :: with_capacity ( len) ;
101
105
let mut virtual_column_size = Vec :: with_capacity ( len) ;
106
+ let mut block_stats_size = Vec :: with_capacity ( len) ;
102
107
103
108
let segments_io = SegmentsIO :: create ( ctx. clone ( ) , tbl. operator . clone ( ) , tbl. schema ( ) ) ;
104
109
@@ -134,6 +139,7 @@ impl TableMetaFunc for FuseBlock {
134
139
. as_ref ( )
135
140
. map ( |m| m. virtual_column_size ) ,
136
141
) ;
142
+ block_stats_size. push ( block. block_stats_meta . as_ref ( ) . map ( |m| m. size ) ) ;
137
143
138
144
num_rows += 1 ;
139
145
if num_rows >= limit {
@@ -157,6 +163,7 @@ impl TableMetaFunc for FuseBlock {
157
163
UInt64Type :: from_opt_data( ngram_index_size) . into( ) ,
158
164
UInt64Type :: from_opt_data( vector_index_size) . into( ) ,
159
165
UInt64Type :: from_opt_data( virtual_column_size) . into( ) ,
166
+ UInt64Type :: from_opt_data( block_stats_size) . into( ) ,
160
167
] ,
161
168
num_rows,
162
169
) )
You can’t perform that action at this time.
0 commit comments