Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#2,242 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
1-2 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
database

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

#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.

Lingua principale
TypeScript
Stelle
3.9k
Fork
277
Merge medio
18h 7m
PR unite (30g)
228

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TanStack/db

Tutte le issue di TanStack/db

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.