Reservoir Sampling's sample size accepts a value below 1

オープン 初心者向け
#9,506 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
75/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
scala
領域
backend

調査の方向性

Reservoir Sampling のスキーマ宣言を見つけ、k プロパティを特定してください。#8514 で参照されている変更で、ファイルスキャンの Limit プロパティと Offset プロパティが最小値をどのように宣言しているかを読み、同じスキーマ上の制約を k に適用してください。オペレーターのリファレンスページを確認し、フォームが 1 未満の値を拒否し、デフォルトが未指定として表示されることを確かめてください。

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
Scala
スター
333
フォーク
202
平均マージ
3日 11時間
マージ済み PR(30日)
185

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/texera のほかの issue

apache/texera の issue をすべて見る

似ている issue

Scala の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。