Reservoir Sampling's sample size accepts a value below 1

Aperta Adatta ai principianti
#9,506 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à
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
75/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
scala
Ambito
backend

Direzione di ricerca

Trova la dichiarazione dello schema di Reservoir Sampling e individua la proprietà k. Leggi come le proprietà Limit e Offset delle scansioni dei file dichiarano il valore minimo nella modifica indicata da #8514, quindi applica lo stesso limite dello schema a k. Controlla la pagina di riferimento dell’operatore e conferma che il modulo rifiuta i valori inferiori a 1 e che il valore predefinito è indicato come non specificato.

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

Descrizione

Task Summary

Reservoir Sampling's one property, the sample size k ("Number of item sampled in reservoir sampling"), has no lower bound in its schema. So the property editor accepts 0 or a negative number and enables Run.

A sample size below 1 is never valid. The engine refuses it at the first row, but a refused row pauses the worker rather than failing the run, so Reservoir Sampling stays Running until the run is killed. A new operator starts with k empty, and the required check already blocks Run; it is a typed 0 or a negative number that gets through.

Declaring minimum: 1 on k (@JsonSchemaInject(json = """{"minimum": 1}"""), as #8514 did for the file scans' Limit and Offset) makes the form refuse the value. The editor then shows "Invalid Workflow" instead of starting a run that hangs. A k from the API, an imported workflow or a loop variable still reaches the engine, whose refusal covers it. The operator's reference page lists the default as 0, which the schema doesn't declare; it becomes "-" with "(min: 1)".

This is a bound on the form; no operator's behaviour changes.

Found while verifying the fix for #9503.

Task Type
  • Refactor / Cleanup
  • DevOps / Deployment / CI
  • Testing / QA
  • Documentation
  • Performance
  • Other
Lingua principale
Scala
Stelle
333
Fork
202
Merge medio
3g 11h
PR unite (30g)
185

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 apache/texera

Tutte le issue di apache/texera

Issue simili

Altre issue su Scala

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.