Fesod version
Current main at 5a9a16b.
Description
The documentation defines numRows = 0 as unlimited, but the default ReadListener#hasNext treats zero as an active limit and stops before delivering the first row.
Location
fesod-sheet/src/main/java/org/apache/fesod/sheet/read/listener/ReadListener.java:101-106
website/docs/sheet/read/num-rows.md:32
website/docs/sheet/help/parameter.md:163,175
Reproduction
Reading the same three-row workbook produced these results:
no numRows setting: 3 rows
numRows(0): 0 rows
numRows(1): 1 row
At row index 0, the current condition limit != null && index >= limit evaluates to true for a zero limit.
Expected behavior
numRows(0) should behave like no row limit, as documented, across XLSX, XLS, and CSV.
Suggested fix
Apply the limit only when it is positive and add a parameterized regression test for all supported read formats.
Related existing work
Issues #151, #661, and #937 cover other numRows behavior, primarily callbacks and multi-sheet reads. They do not cover the documented zero sentinel.
Are you willing to submit a PR?
Yes.
Fesod version
Current
mainat5a9a16b.Description
The documentation defines
numRows = 0as unlimited, but the defaultReadListener#hasNexttreats zero as an active limit and stops before delivering the first row.Location
fesod-sheet/src/main/java/org/apache/fesod/sheet/read/listener/ReadListener.java:101-106website/docs/sheet/read/num-rows.md:32website/docs/sheet/help/parameter.md:163,175Reproduction
Reading the same three-row workbook produced these results:
At row index
0, the current conditionlimit != null && index >= limitevaluates to true for a zero limit.Expected behavior
numRows(0)should behave like no row limit, as documented, across XLSX, XLS, and CSV.Suggested fix
Apply the limit only when it is positive and add a parameterized regression test for all supported read formats.
Related existing work
Issues #151, #661, and #937 cover other
numRowsbehavior, primarily callbacks and multi-sheet reads. They do not cover the documented zero sentinel.Are you willing to submit a PR?
Yes.