kz930 opened a new pull request, #8514: URL: https://github.com/apache/texera/pull/8514
### What changes were proposed in this PR? Every file-scan source takes a Limit and an Offset from `ScanSourceOpDesc`, and neither field said it cannot be negative. Both now declare `minimum: 0`. Neither value means anything below zero, and a negative one is not read the same way twice. The executors take the window with Scala's `drop` and `take`, where a negative drop keeps every row and a negative take keeps none. The scripts the export writes take the same window with `iloc`, which counts from the end instead. So `offset = -1` is every row on one side and the last row on the other, and `limit = -1` is no rows on one side and all but the last on the other. Declaring the bound states what the operators already assume, and the property editor then refuses the value rather than passing it on. It reaches CSV, CSVOld, JSONL, Arrow and the file scans at once, all of which inherit the two fields. No executor changes. This is a bound on the form: a plan submitted straight through the API can still carry a negative, and nothing about how one is processed is touched here. ### Any related issues, documentation, discussions? Closes #8513, the task this change is the whole of. ### How was this PR tested? A case in `ScanSourceOpDescSpec` validates `-1`, `0` and `5` against the generated schema for both fields, through the same validator the property editor uses rather than restating the bound the schema declares. The 163 tests across the scan-source specs pass unchanged. The four numbers quoted above were read off the two runtimes rather than from memory: `Iterator(1,2,3,4,5).drop(-1)` keeps all five and `.take(-1)` keeps none, while pandas' `iloc[-1:]` is the last row and `iloc[:-1]` is the first four. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5) 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
