Skip to content

all_schema() will skip ExtensionPlan's own schema and fetches schemas from children plans #5513

@waynexia

Description

@waynexia

Describe the bug

I found a regression when debugging GreptimeTeam/greptimedb#1136. Since #5236 the all_schema() won't use the schema of ExtensionPlan, but its children's schemas.

To Reproduce

Not important

Expected behavior

It should use the schema from ExtensionPlan

Additional context

As @alamb and @jackwener discussed in #5236 (review), all_schema() seems unnecessary. It looks like all the usages of all_schema() are for naming a column (the collected schemas are passed to normalize_with_schemas()). But, only a few plans can have multiple inputs (join, union, and maybe extension). I'm wondering if we can take special care of them inside normalize_with_schemas() and remove all_schema() (using_columns in normalize_with_schemas() looks like something is doing this)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions