4paradigm / 4paradigm/OpenMLDB

feat: scalar subquery and correlated subquery

Đang mở
#3,714 0 bình luận 0 reaction 1 người được giao Được @aceforeverd nhận Xem trên GitHub
enhancement execute-engine high-priority sql
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

Mở 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

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.