apache / apache/datafusion

Add reservoir sampling

Aperta
#11,554 1 commento 1 reazione 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
Rust
Stelle
9.3k
Fork
2.4k
Merge medio
3g 11h
PR unite (30g)
360

Descrizione

### Is your feature request related to a problem or challenge?

We have a large sample of statistical data. All we need is a subset of the data that maintains statistical significance while being able to return a much smaller result to users since insignificantly small values aren't contained resulting in much lower latency.

### Describe the solution you'd like

Add the ability to (statistically) sample rows. We've done this using reservoir sampling before. I imagine statistical sampling is a widely enough used function that it should be supported first-class.

### Describe alternatives you've considered

I don't know enough about DataFusion to know whether this is possible via a UDF. In the past, we've had issues where records pushed into the query layer are sampled. However, the underlying record is still held onto as immediately materializing it would result in tiny and inefficient 1-row records, but eventually, they need to be materialized as otherwise memory explodes.

### Additional context

_No response_

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Non sono indicati file, test o punti di ingresso. Inizia esaminando l’esecuzione delle query e le funzionalità UDF di DataFusion, quindi chiarisci la semantica del campionamento, il comportamento della materializzazione e l’interfaccia di query supportata prima di definire l’ambito dell’implementazione e i test di accettazione.

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

Valutazione

Stack tecnologico
rust, sql
Ambito
data, databases
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.