Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

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

Aberta
#2,242 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
48/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
typescript
Domínio
database

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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

Linguagem predominante
TypeScript
Estrelas
4k
Forks
277
Merge médio
1d 4h
PRs com merge (30d)
212

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de TanStack/db

Todas as issues de TanStack/db

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.