Open
Description
Summary
- fix: Plan should never implement Serialize and Deserialize #7855
- refactor: Cleanup Table trait #7827
- feat(meta): Add catalog in TableMeta #7835
- refactor: Remove catalog from Table API #7869
- Rename
read2
toread
- Rename
append2
toappend
- Catalog / Table should don't depend on any
Plan
- Migrate
Extras
inread_partitions
- Migrate
ReadDataSourcePlan
inread2
- Migrate
DeletePlan
indelete
- Migrate
References
For Migrate ReadDataSourcePlan
in read2
We will call table.read2()
during fn build_table_scan(&mut self, scan: &TableScan) -> Result<()>
:
fn build_table_scan(&mut self, scan: &TableScan) -> Result<()> {
let table = self.ctx.build_table_from_source_plan(&scan.source)?;
self.ctx.try_set_partitions(scan.source.parts.clone())?;
table.read2(self.ctx.clone(), &scan.source, &mut self.main_pipeline)?;
let schema = scan.source.schema();
let projections = scan
.name_mapping
.iter()
.map(|(name, _)| schema.index_of(name.as_str()))
.collect::<Result<Vec<usize>>>()?;
self.main_pipeline.add_transform(|input, output| {
Ok(TransformProject::create(input, output, projections.clone()))
})?;
self.main_pipeline.add_transform(|input, output| {
Ok(TransformRename::create(
input,
output,
scan.output_schema()?,
))
})
}
We should build a new args for table.read()
so that we don't need to use logical plan ReadDataSourcePlan
.