You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fesod.apache.org by "BigDataDZ (via GitHub)" <gi...@apache.org> on 2026/10/07 14:44:35 UTC

[PR] fix: treat numRows(0) as no row limit when reading (#1149) [fesod]

BigDataDZ opened a new pull request, #1189:
URL: https://github.com/apache/fesod/pull/1189

   ## What changed
   
   The default `ReadListener#hasNext` now applies the `numRows` limit only when it is positive. Zero — documented as *"no limit on the number of rows, i.e. read all rows"* — previously stopped the read before the first row.
   
   ## Why
   
   ```text
   no numRows setting: 3 rows
   numRows(0):          0 rows   # was stopped immediately
   numRows(1):          1 row
   ```
   
   The row index starts at the head row, so a zero limit failed `index >= limit` for every row including the first one.
   
   Fixes #1149
   
   ## How tested
   
   New `NumRowsReadLimitTest`, parameterized over XLSX / XLS / CSV via `@ExcelFormatSource` on headless workbooks (so the limit maps one-to-one onto data rows):
   - `numRows(0)` reads all rows, same as omitting the setting
   - a positive limit (`numRows(1)`) still stops the read early
   
   Full `fesod-sheet` suite passes locally on Temurin 25; `spotless:check` clean.
   


-- 
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: commits-unsubscribe@fesod.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fesod.apache.org
For additional commands, e-mail: commits-help@fesod.apache.org


Re: [PR] fix: treat numRows(0) as no row limit when reading (#1149) [fesod]

Posted by "BigDataDZ (via GitHub)" <gi...@apache.org>.
BigDataDZ closed pull request #1189: fix: treat numRows(0) as no row limit when reading (#1149)
URL: https://github.com/apache/fesod/pull/1189


-- 
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: commits-unsubscribe@fesod.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fesod.apache.org
For additional commands, e-mail: commits-help@fesod.apache.org


Re: [PR] fix: treat numRows(0) as no row limit when reading (#1149) [fesod]

Posted by "BigDataDZ (via GitHub)" <gi...@apache.org>.
BigDataDZ commented on PR #1189:
URL: https://github.com/apache/fesod/pull/1189#issuecomment-6073080856

   Closing in favor of #1159 — the core change is identical (only a positive limit should stop the read). I left a suggestion there to also guard the omitted-`numRows` and positive-limit cases.


-- 
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: commits-unsubscribe@fesod.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fesod.apache.org
For additional commands, e-mail: commits-help@fesod.apache.org