Sink a filter that carries a projection into NdFilterExec

Aperta
#397 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@robinskil ci sta già lavorando.

Dal 17/8/2026.

  • #401 di @robinskil — chiusa senza merge

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

enhancement rust

Problem

NdFilterPushdown moves the conjuncts of a FilterExec below NdBroadcastExec. The rule
refuses a FilterExec that carries a projection. See filter.projection().is_some() in
beacon-db/beacon-datafusion-ext/src/nd/optimizer.rs.

DataFusion adds a projection to the filter when a query selects fewer columns than the
predicate reads. This shape is common.

-- the rule fires
SELECT lat, lon FROM g WHERE ST_Within(ST_Point(lon, lat), <box>)
-- the rule stops
SELECT lat FROM g WHERE ST_Within(ST_Point(lon, lat), <box>)

count(*) always gets an empty projection. The rule never fires for it.

Effect

Measured on gridded-example.nc, 1208 lat by 1920 lon:

plan filter broadcast
rule fires NdFilterExec 524 ms 0 ms
rule stops FilterExec 355 ms 81 ms

The second plan broadcasts every column onto the full grid first. It then drops most rows.

Proposed fix

Split the filter into two nodes. Put the conjuncts in NdFilterExec. Put the projection in an
NdProjectionExec above it. NdProjectionExec already runs below the broadcast. It already
keeps the grid selection of its child.

Tests

beacon-db/beacon-core/tests/nd_pipeline_filters.rs holds
a_narrowing_select_list_keeps_the_filter_above_the_broadcast. This test records the present
behaviour. Update it when the rule changes.

Lingua principale
Rust
Stelle
16
Fork
4
Merge medio
19h 58m
PR unite (30g)
39

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

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 maris-development/beacon

Tutte le issue di maris-development/beacon

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.