Skip to content

Validate subquery expressions #2361

Closed
Closed

Description

@andygrove

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
The SQL query planner and the DataFrame API both allow logical plans to be created that contain subquery expressions but we do not yet do any validation on these expressions.

Examples of validation we should do:

  • Scalar subqueries should return a single row and single column
  • IN subqueries should return a single column

Describe the solution you'd like
I am leaning towards performing this validation in an optimizer rule because that would be applied regardless of how the logical plan was created.

Describe alternatives you've considered
None

Additional context
None

Activity

  1. jon-chuang commented on May 7, 2022

    @jon-chuang

    @andygrove is there any reason why we can't support multiple columns in the IN subquery? As far as implementation goes, it's fairly trivial.

  2. mingmwang commented on Mar 13, 2023

    @mingmwang
    Contributor

    I am working on it now.

  3. mingmwang commented on Mar 13, 2023

    @mingmwang
    Contributor

    @jon-chuang
    I think we do not support named Struct in DataFusion today.

  4. mingmwang commented on May 17, 2023

    @mingmwang
    Contributor

    This issue is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions