@@ -19,11 +19,12 @@ use databend_common_catalog::table_args::TableArgs;
19
19
use databend_common_exception:: ErrorCode ;
20
20
use databend_common_exception:: Result ;
21
21
use databend_common_meta_types:: MetaId ;
22
- use databend_common_storages_fuse:: table_functions:: ClusteringStatisticsTable ;
22
+ use databend_common_storages_fuse:: table_functions:: ClusteringStatisticsFunc ;
23
23
use databend_common_storages_fuse:: table_functions:: FuseAmendTable ;
24
- use databend_common_storages_fuse:: table_functions:: FuseColumnTable ;
25
- use databend_common_storages_fuse:: table_functions:: FuseEncodingTable ;
26
- use databend_common_storages_fuse:: table_functions:: SetCacheCapacity ;
24
+ use databend_common_storages_fuse:: table_functions:: FuseBlockFunc ;
25
+ use databend_common_storages_fuse:: table_functions:: FuseColumnFunc ;
26
+ use databend_common_storages_fuse:: table_functions:: FuseEncodingFunc ;
27
+ use databend_common_storages_fuse:: table_functions:: FuseStatisticsFunc ;
27
28
use databend_common_storages_fuse:: table_functions:: TableFunctionTemplate ;
28
29
use databend_common_storages_stream:: stream_status_table_func:: StreamStatusTable ;
29
30
use itertools:: Itertools ;
@@ -35,11 +36,10 @@ use super::SuggestedBackgroundTasksTable;
35
36
use super :: TenantQuotaTable ;
36
37
use crate :: catalogs:: SYS_TBL_FUC_ID_END ;
37
38
use crate :: catalogs:: SYS_TBL_FUNC_ID_BEGIN ;
38
- use crate :: storages:: fuse:: table_functions:: ClusteringInformationTable ;
39
- use crate :: storages:: fuse:: table_functions:: FuseBlockTable ;
40
- use crate :: storages:: fuse:: table_functions:: FuseSegmentTable ;
41
- use crate :: storages:: fuse:: table_functions:: FuseSnapshotTable ;
42
- use crate :: storages:: fuse:: table_functions:: FuseStatisticTable ;
39
+ use crate :: storages:: fuse:: table_functions:: ClusteringInformationFunc ;
40
+ use crate :: storages:: fuse:: table_functions:: FuseSegmentFunc ;
41
+ use crate :: storages:: fuse:: table_functions:: FuseSnapshotFunc ;
42
+ use crate :: storages:: fuse:: table_functions:: SetCacheCapacityFunc ;
43
43
use crate :: table_functions:: async_crash_me:: AsyncCrashMeTable ;
44
44
use crate :: table_functions:: cloud:: TaskDependentsEnableTable ;
45
45
use crate :: table_functions:: cloud:: TaskDependentsTable ;
@@ -121,7 +121,10 @@ impl TableFunctionFactory {
121
121
122
122
creators. insert (
123
123
"fuse_snapshot" . to_string ( ) ,
124
- ( next_id ( ) , Arc :: new ( FuseSnapshotTable :: create) ) ,
124
+ (
125
+ next_id ( ) ,
126
+ Arc :: new ( TableFunctionTemplate :: < FuseSnapshotFunc > :: create) ,
127
+ ) ,
125
128
) ;
126
129
127
130
creators. insert (
@@ -136,34 +139,56 @@ impl TableFunctionFactory {
136
139
"set_cache_capacity" . to_string ( ) ,
137
140
(
138
141
next_id ( ) ,
139
- Arc :: new ( TableFunctionTemplate :: < SetCacheCapacity > :: create) ,
142
+ Arc :: new ( TableFunctionTemplate :: < SetCacheCapacityFunc > :: create) ,
140
143
) ,
141
144
) ;
142
145
143
146
creators. insert (
144
147
"fuse_segment" . to_string ( ) ,
145
- ( next_id ( ) , Arc :: new ( FuseSegmentTable :: create) ) ,
148
+ (
149
+ next_id ( ) ,
150
+ Arc :: new ( TableFunctionTemplate :: < FuseSegmentFunc > :: create) ,
151
+ ) ,
146
152
) ;
153
+
147
154
creators. insert (
148
155
"fuse_block" . to_string ( ) ,
149
- ( next_id ( ) , Arc :: new ( FuseBlockTable :: create) ) ,
156
+ (
157
+ next_id ( ) ,
158
+ Arc :: new ( TableFunctionTemplate :: < FuseBlockFunc > :: create) ,
159
+ ) ,
150
160
) ;
161
+
151
162
creators. insert (
152
163
"fuse_column" . to_string ( ) ,
153
- ( next_id ( ) , Arc :: new ( FuseColumnTable :: create) ) ,
164
+ (
165
+ next_id ( ) ,
166
+ Arc :: new ( TableFunctionTemplate :: < FuseColumnFunc > :: create) ,
167
+ ) ,
154
168
) ;
169
+
155
170
creators. insert (
156
171
"fuse_statistic" . to_string ( ) ,
157
- ( next_id ( ) , Arc :: new ( FuseStatisticTable :: create) ) ,
172
+ (
173
+ next_id ( ) ,
174
+ Arc :: new ( TableFunctionTemplate :: < FuseStatisticsFunc > :: create) ,
175
+ ) ,
158
176
) ;
159
177
160
178
creators. insert (
161
179
"clustering_information" . to_string ( ) ,
162
- ( next_id ( ) , Arc :: new ( ClusteringInformationTable :: create) ) ,
180
+ (
181
+ next_id ( ) ,
182
+ Arc :: new ( TableFunctionTemplate :: < ClusteringInformationFunc > :: create) ,
183
+ ) ,
163
184
) ;
185
+
164
186
creators. insert (
165
187
"clustering_statistics" . to_string ( ) ,
166
- ( next_id ( ) , Arc :: new ( ClusteringStatisticsTable :: create) ) ,
188
+ (
189
+ next_id ( ) ,
190
+ Arc :: new ( TableFunctionTemplate :: < ClusteringStatisticsFunc > :: create) ,
191
+ ) ,
167
192
) ;
168
193
169
194
creators. insert (
@@ -232,7 +257,10 @@ impl TableFunctionFactory {
232
257
233
258
creators. insert (
234
259
"fuse_encoding" . to_string ( ) ,
235
- ( next_id ( ) , Arc :: new ( FuseEncodingTable :: create) ) ,
260
+ (
261
+ next_id ( ) ,
262
+ Arc :: new ( TableFunctionTemplate :: < FuseEncodingFunc > :: create) ,
263
+ ) ,
236
264
) ;
237
265
238
266
creators. insert (
0 commit comments