Skip to content

Add support for scalar subqueries in BETWEEN expressions #3667

New issue

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

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

Already on GitHub? # to your account

Closed
andygrove opened this issue Sep 30, 2022 · 1 comment · Fixed by #6372
Closed

Add support for scalar subqueries in BETWEEN expressions #3667

andygrove opened this issue Sep 30, 2022 · 1 comment · Fixed by #6372
Labels
enhancement New feature or request optimizer Optimizer rules sql SQL Planner

Comments

@andygrove
Copy link
Member

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

echo "1,2" > test.csv
❯ create external table test (a decimal(10,2), b decimal(10,2)) stored as csv location 'test.csv';
0 rows in set. Query took 0.002 seconds.
❯ select * from test where a between (select distinct a from test) and (select distinct b from test);

NotImplemented("Physical plan does not support logical expression (<subquery>)")

This works fine in Postgres:

select * from test where a between (select distinct a from test) and (select distinct b from test);
  a   |  b   
------+------
 1.00 | 2.00
(1 row)

Describe the solution you'd like
Make this query work

Describe alternatives you've considered
None

Additional context
None

@andygrove
Copy link
Member Author

This may be a duplicate of #3725

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request optimizer Optimizer rules sql SQL Planner
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant