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

sql: ANY/ALL with subqueries #17662

Closed
justinj opened this issue Aug 15, 2017 · 0 comments
Closed

sql: ANY/ALL with subqueries #17662

justinj opened this issue Aug 15, 2017 · 0 comments
Assignees

Comments

@justinj
Copy link
Contributor

justinj commented Aug 15, 2017

We currently support ANY and ALL with ARRAYs:

root@:26257/> SELECT 3 = ALL ARRAY[3,3,3];
+------------------------+
| 3 = ALL ARRAY[3, 3, 3] |
+------------------------+
| true                   |
+------------------------+
(1 row)

Time: 1.991091ms

root@:26257/> SELECT 3 = ALL ARRAY[3, 3, 4];
+------------------------+
| 3 = ALL ARRAY[3, 3, 4] |
+------------------------+
| false                  |
+------------------------+
(1 row)

Time: 532.323µs

We should also support this with (uncorrelated) subqueries:

root@:26257/> SELECT 3 = ALL (SELECT 3);
pq: unsupported comparison operator: 3 = ALL (SELECT 3): op ALL array requires array on right side
root@:26257/> SELECT 3 = ANY (SELECT 3);
pq: unsupported comparison operator: 3 = ANY (SELECT 3): op ANY array requires array on right side

cc @knz @nvanbenschoten

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants