12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
14
15
-
16
15
use std:: any:: Any ;
17
16
use std:: ops:: Not ;
18
17
use std:: sync:: Arc ;
19
18
20
19
use common_catalog:: plan:: PartInfoPtr ;
21
20
use common_catalog:: table_context:: TableContext ;
22
- use common_datablocks:: serialize_data_blocks ;
21
+ use common_datablocks:: serialize_to_parquet ;
23
22
use common_datablocks:: DataBlock ;
24
23
use common_datavalues:: BooleanColumn ;
25
24
use common_datavalues:: ColumnRef ;
@@ -35,6 +34,7 @@ use opendal::Operator;
35
34
use crate :: io:: write_data;
36
35
use crate :: io:: BlockReader ;
37
36
use crate :: io:: TableMetaLocationGenerator ;
37
+ use crate :: operations:: mutation:: MutationPartInfo ;
38
38
use crate :: operations:: util;
39
39
use crate :: operations:: BloomIndexState ;
40
40
use crate :: pipelines:: processors:: port:: OutputPort ;
@@ -57,8 +57,11 @@ pub struct UpdateSource {
57
57
state : State ,
58
58
ctx : Arc < dyn TableContext > ,
59
59
output : Arc < OutputPort > ,
60
- }
61
60
61
+ index : BlockIndex ,
62
+ cluster_stats_gen : ClusterStatsGenerator ,
63
+ origin_stats : Option < ClusterStatistics > ,
64
+ }
62
65
63
66
#[ async_trait:: async_trait]
64
67
impl Processor for UpdateSource {
@@ -117,6 +120,14 @@ impl Processor for UpdateSource {
117
120
118
121
async fn async_process ( & mut self ) -> Result < ( ) > {
119
122
match std:: mem:: replace ( & mut self . state , State :: Finish ) {
123
+ State :: ReadData ( Some ( part) ) => {
124
+ let part = MutationPartInfo :: from_part ( & part) ?;
125
+ self . index = part. index ;
126
+ self . origin_stats = part. cluster_stats . clone ( ) ;
127
+ let inner_part = part. inner_part . clone ( ) ;
128
+ // let chunks = self.block_reader.read_columns_data(inner_part.clone()).await?;
129
+ // self.state = State::FilterData(inner_part, chunks);
130
+ }
120
131
_ => return Err ( ErrorCode :: Internal ( "It's a bug." ) ) ,
121
132
}
122
133
Ok ( ( ) )
0 commit comments