The GitHub Actions job "Required Checks" on texera.git/release/v1.2 has succeeded. Run started by GitHub user github-merge-queue[bot] (triggered by github-merge-queue[bot]).
Head commit for run: 2a8b858e5155c5230f4dfb866838a0f985730a8f / Eugene Gu <[email protected]> fix(workflow-operator, v1.2): Text Input operator using offset with an empty limit emits no rows (#7529) ### What changes were proposed in this PR? Backport of #7347 to `release/v1.2`, cherry-picked from main commit 91235fbdb (clean, no conflicts). `TextInputSourceOpExec` computed its line window as `slice(offset, offset + limit.getOrElse(Int.MaxValue))`. With an Offset set and the Limit left empty, the addition overflows `Int` to a negative bound, which Scala 2.13's `Iterator.slice` clamps to 0 and then returns an empty iterator — so the operator silently emitted **zero rows** while the workflow reported success. Any Offset ≥ 1 with an empty Limit is affected, and an explicit large Limit (e.g. `Int.MaxValue`) overflows the same way. This contradicts the Limit property's own description, "Leave empty to read all lines." The fix replaces the slice with `drop(offset)` + `take(limit)`, the same idiom the CSV, Arrow, and JSONL scan sources already use. There is no addition, so nothing can overflow; every configuration that previously worked is unchanged. ### Any related issues, documentation, discussions? Backport of #7347 (originally closed #7346). ### How was this PR tested? The 7 regression tests from #7347 come along with the cherry-pick. On this branch: ```bash sbt "WorkflowOperator/testOnly org.apache.texera.amber.operator.source.scan.text.TextInputSourceOpDescSpec" # 15 tests, all passed (8 pre-existing on release/v1.2 + 7 new) # (main has 17: two getPhysicalOp/propagateSchema coverage tests were added # to this spec after v1.2 branched and are unrelated to this fix) sbt "WorkflowOperator/scalafmtCheck" "WorkflowOperator/Test/scalafmtCheck" # passed sbt "WorkflowOperator/scalafixAll --check" # passed ``` ### Was this PR authored or co-authored using generative AI tooling? Co-authored by: Claude Code (Claude Fable 5) Co-authored-by: Xinyuan Lin <[email protected]> Report URL: https://github.com/apache/texera/actions/runs/31672059342 With regards, GitHub Actions via GitBox
