kz930 opened a new issue, #7245:
URL: https://github.com/apache/texera/issues/7245
### What happened?
`JSONLScanSourceOpExec.open()` applies the offset twice. Line 66 drops
`offset` lines from the reader, so the iterator it keeps already begins at the
requested row. Lines 71 to 74 then compute the worker's slice bounds as
`offsetValue + …`, which are positions in the *original* file, and line 76
applies them to that already-offset iterator. The rows between the two are
skipped, and when what remains is shorter than the offset the operator emits
nothing at all. Nothing is logged and the operator reports success either way.
With a five-line file holding `v` = 0 through 4, read by a single worker
unless noted:
| Offset | Limit | Rows produced | Expected |
| --- | --- | --- | --- |
| — | — | 0, 1, 2, 3, 4 | same |
| — | 2 | 0, 1 | same |
| 2 | — | 4 | 2, 3, 4 |
| 2 | 2 | *(none)* | 2, 3 |
| 1 | 3 | 2, 3 | 1, 2, 3 |
| 2 | — (two workers) | 4 and *(none)* | 2, 3 and 4 |
An unset offset is unaffected, which is why this has gone unnoticed —
`JSONLScanSourceOpExecSpec` covers the row limit but never sets an offset.
The fix is to pick one frame of reference: either drop the `offsetValue +`
from the two bound expressions, so the bounds are relative to the iterator they
are applied to, or stop dropping at line 66 and let the slice do all the work.
### How to reproduce?
1. Write a five-line JSONL file whose lines are `{"v":0}` through `{"v":4}`.
2. Add a JSON Lines File Scan reading that file, set Offset to 2, leave
Limit empty, and run.
3. One row comes out, `v` = 4, instead of the expected three.
4. Set Limit to 2 as well and run again — the operator now produces no rows,
still without an error.
The same is reachable directly from `JSONLScanSourceOpExec` with `idx = 0`
and `workerCount = 1`, so no workflow or UI is required.
### Version/Branch
1.3.0-incubating-SNAPSHOT (main)
### Commit Hash
33cc5d16096aa05095f483ee8724e799c95d7898
### Relevant log output
```shell
(no output — the operator completes successfully with rows missing)
```
--
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]