4paradigm / 4paradigm/OpenMLDB
feat: scalar subquery and correlated subquery
- Ngôn ngữ chính
- C++
- Star
- 1.7k
- Fork
- 331
- Merge trung bình
- 12 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 1
Mô tả
ref https://github.com/google/zetasql/blob/master/docs/subqueries.md
Currently only table subquery is supported, while in many cases, subquery inside expression is necessary.
E.g.
```sql
SELECT mascot
FROM Mascots
WHERE
NOT EXISTS(SELECT username FROM Players WHERE Mascots.team = Players.team);
```
or
```sql
SELECT id, agg_func(col1) over w from t1
window w as (
partition by col2 order by ts
rows between
(select max(col2) over w from t1 window w as(...) ) preceding
and current row
)
```
Hướng dẫn đóng góp
Hướng nghiên cứu
The issue references ZetaSQL's subqueries documentation. Look at the existing table subquery implementation in the codebase, likely in the SQL parser or query planner. Understand how expressions are currently evaluated and where scalar and correlated subqueries would need to be integrated. Check for existing tests related to subqueries to see the expected behavior.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- sql
- Lĩnh vực
- databases, machine-learning
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100