Skip to content

Tracing issues of Catalog Refactor #7816

Open
@Xuanwo

Description

@Xuanwo

Summary

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    TrackingstaleIssue has not had recent activity or appears to be solved. Stale issues will be automatically closed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions