zhengxiang378928908-code opened a new pull request, #19104:
URL: https://github.com/apache/iceberg/pull/19104

   `CatalogHandlers.planTableScan` treated `min-rows-requested` as a cap on the 
number of file scan tasks, assuming each task yields at least one row. A task 
whose rows are removed by delete files or by its residual filter can yield 
none, so the server could return fewer rows than the scan contains; with 
Spark's LIMIT pushdown against a REST table using server-side planning, `LIMIT 
1` could return no rows. Planning now stops only once tasks without delete 
files and with an always-true residual cover the requested rows, the same rule 
#18715 uses for local planning.
   
   Test plan:
   - Files with delete files do not count toward the requested rows, for 
synchronous and asynchronous planning.
   - Files with a non-trivial residual do not count toward the requested rows, 
for both planning modes.
   - The existing `scanPlanningWithMinRowsRequested` still returns a single 
task when files have no deletes and no residual.
   
   ---
   **AI Disclosure**
   - Model: Claude Opus 5.5
   - Platform/Tool: Claude Code
   - Human Oversight: partially reviewed
   - Prompt Summary: Find a correctness bug in recent Iceberg code, check for 
upstream duplicates, reproduce it with a failing test, and fix it. The bug 
analysis, fix, and tests are generated.
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

  • [PR] Core: Count rows, no... zhengxiang378928908-code (via GitHub) via issues

Reply via email to