Skip to content

repr: handle subqueries that have relation as children of scalar #16

Closed as not planned
@yliang412

Description

@yliang412

Problem

In subqueries, you might have relations as children of scalar operators. Although we are going to try to unnest the subquery in the optimizer, we should still be able to represent it in the logical plan and maybe also support directly executing the subquery without optimization.

The current IR assumes that scalar always has scalar has children, which is not the case when we add subquery support.

Suggestion

we can maybe have ScalarOperator<Scalar, Relation>, but only for the scalar operators that take in relation as children, you will have something like Subquery<Relation, Scalar>. For others, do what we have right now e.g. Add<Scalar>.

Resources

Unnesting Arbitrary Queries - Mark Raasveldt youtube slides.

Originally posted by @yliang412 in #4 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions