@@ -136,7 +136,7 @@ public HoodieTableSource(
136136 List <String > partitionKeys ,
137137 String defaultPartName ,
138138 Configuration conf ) {
139- this (schema , path , partitionKeys , defaultPartName , conf , null , null , null , null );
139+ this (schema , path , partitionKeys , defaultPartName , conf , null , null , null , null , null );
140140 }
141141
142142 public HoodieTableSource (
@@ -148,7 +148,8 @@ public HoodieTableSource(
148148 @ Nullable FileIndex fileIndex ,
149149 @ Nullable List <Map <String , String >> requiredPartitions ,
150150 @ Nullable int [] requiredPos ,
151- @ Nullable Long limit ) {
151+ @ Nullable Long limit ,
152+ @ Nullable HoodieTableMetaClient metaClient ) {
152153 this .schema = schema ;
153154 this .tableRowType = (RowType ) schema .toPhysicalRowDataType ().notNull ().getLogicalType ();
154155 this .path = path ;
@@ -164,7 +165,7 @@ public HoodieTableSource(
164165 : requiredPos ;
165166 this .limit = limit == null ? NO_LIMIT_CONSTANT : limit ;
166167 this .hadoopConf = HadoopConfigurations .getHadoopConf (conf );
167- this .metaClient = StreamerUtil .metaClientForReader (conf , hadoopConf );
168+ this .metaClient = metaClient == null ? StreamerUtil .metaClientForReader (conf , hadoopConf ) : metaClient ;
168169 this .maxCompactionMemoryInBytes = StreamerUtil .getMaxCompactionMemoryInBytes (conf );
169170 }
170171
@@ -215,7 +216,7 @@ public ChangelogMode getChangelogMode() {
215216 @ Override
216217 public DynamicTableSource copy () {
217218 return new HoodieTableSource (schema , path , partitionKeys , defaultPartName ,
218- conf , fileIndex , requiredPartitions , requiredPos , limit );
219+ conf , fileIndex , requiredPartitions , requiredPos , limit , metaClient );
219220 }
220221
221222 @ Override
0 commit comments