fix(workflow-operator, v1.2): Text Input operator using offset with an empty limit emits no rows - #7529
Open
eugenegujing wants to merge 1 commit into
Conversation
…n empty limit emits no rows (cherry picked from commit 91235fb)
Contributor
Automated Reviewer SuggestionsBased on the
|
xuang7
approved these changes
Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
Backport of #7347 to
release/v1.2, cherry-picked from main commit 91235fb (clean, no conflicts).TextInputSourceOpExeccomputed its line window asslice(offset, offset + limit.getOrElse(Int.MaxValue)). With an Offset set and the Limit left empty, the addition overflowsIntto a negative bound, which Scala 2.13'sIterator.sliceclamps 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:
Was this PR authored or co-authored using generative AI tooling?
Co-authored by: Claude Code (Claude Fable 5)