Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Ordered window filtered through a LEFT-joined subquery requests its full source

Đang mở
#2,242 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
database

Hướng nghiên cứu

Read issue #1909 and trace how ordered windows set requiresFullSource for joined filters, especially the joinedFilterSourceOf path. Compare a collection join with the described single-source subquery join, then add a regression test for the visible-runs example. Done means the subquery join waits on its source as proposed and the relevant tests pass; the issue gives no test file or entry point.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

#1909 pages an ordered window whose cross-alias filter goes through exactly one LEFT join to a collection. The same filter through a LEFT join to a subquery that only filters one collection still sets requiresFullSource. An example is the existence check for "has a visible run":

const visibleRuns = new Query()
  .from({ run: runs })
  .where(({ run }) => not(eq(run.userId, 'admin')))
  .select(({ run }) => ({ k: run.seekId }))
  .distinct()

q.from({ seek: seeks })
  .leftJoin({ visible: visibleRuns }, ({ seek, visible }) => eq(seek.id, visible.k))
  .where(({ visible }) => not(isUndefined(visible.k)))
  .orderBy(({ seek }) => seek.updatedAt, 'desc')
  .limit(10)

The subquery is one collection with no joins, limit, offset or grouping. Its rows are lazy-loaded by key into that collection's source, so the joined-filter gate can wait on that source exactly as for a collection join.

Proposal: treat such a subquery join as a joined filter keyed by the subquery's source (joinedFilterSourceOf). Implemented on 0.15.2 with tests; the full suite passes.

Ngôn ngữ chính
TypeScript
Star
4k
Fork
277
Merge trung bình
17 giờ 33 phút
Pull request đã merge (30 ngày)
227

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của TanStack/db

Tất cả issue của TanStack/db

Issue tương tự

Thêm issue về TypeScript

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.