Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#5483 #15307

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

#5483 #15307

wants to merge 2 commits into from

Conversation

SanjayUG
Copy link

Add Subquery Support for BETWEEN Expressions

Which issue does this PR close?

Rationale for this change

This change adds support for scalar subqueries in BETWEEN lower and upper bounds, enhancing the flexibility of query expressions. By enabling subqueries within BETWEEN expressions, we provide users with more powerful and expressive query capabilities.

What changes are included in this PR?

  • feat: Add subquery support for BETWEEN expressions
    • Add support for scalar subqueries in BETWEEN lower and upper bounds
    • Add new_with_subqueries method to validate subquery expressions
    • Update SQL and physical planners to handle subqueries
    • Add documentation with examples and usage patterns

Are these changes tested?

Yes, the changes are tested to ensure that subqueries in BETWEEN expressions are correctly validated and executed. Tests cover various use cases and edge cases to verify the robustness of the implementation.

Are there any user-facing changes?

Yes, users will now be able to use scalar subqueries within BETWEEN expressions in their SQL queries. Documentation has been updated to include examples and usage patterns for this new feature.

Are there any breaking changes to public APIs?

No, there are no breaking changes to public APIs.

@github-actions github-actions bot added documentation Improvements or additions to documentation sql SQL Planner development-process Related to development process of DataFusion logical-expr Logical plan and expressions physical-expr Changes to the physical-expr crates labels Mar 19, 2025
@irenjj
Copy link
Contributor

irenjj commented Mar 19, 2025

Thanks @SanjayUG , but I think this pr is part of #5483, instead of closing it.

- uses: korandoru/hawkeye@v6
- uses: korandoru/hawkeye@e8a6f7b6e9f6e0c3e8c5e9a6f7b6e9f6e0c3e8c5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to change it.

@alamb alamb marked this pull request as draft March 19, 2025 19:24
@alamb
Copy link
Contributor

alamb commented Mar 19, 2025

Thanks @SanjayUG -- it looks like there are some CI failures so marking this PR as a draft for now

@Omega359
Copy link
Contributor

  • cargo fmt
  • prettier
  • revert the hawkeye github action changes (separate PR)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development-process Related to development process of DataFusion documentation Improvements or additions to documentation logical-expr Logical plan and expressions physical-expr Changes to the physical-expr crates sql SQL Planner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[EPIC] More Subquery support
4 participants