carloea2 opened a new pull request, #8194:
URL: https://github.com/apache/texera/pull/8194

   ### What changes were proposed in this PR?
   
   Treat only a missing Iceberg range end as unbounded. Preserve an explicit 
zero end so the documented half-open range from zero to zero remains empty.
   
   Before: get_range(0, 0) computed an infinite limit and could return every 
row.
   
   After: get_range(0, 0) computes a zero limit and returns no rows. Unbounded 
get and get_after behavior is unchanged.
   
   ### Any related issues, documentation, discussions?
   
   Closes #8193
   
   ### How was this PR tested?
   
   Regression test first:
   
       $env:PYTHONDONTWRITEBYTECODE='1'; 
C:\Users\carlo\texera\texera\.venv312\Scripts\python.exe -c "import sys,pytest; 
sys.path[:0]=[r'C:\Users\carlo\texera\texera-worktrees\fix-pyamber-empty-iceberg-range\amber\src\main\python',r'C:\Users\carlo\texera\texera\amber\src\main\python'];
 raise 
SystemExit(pytest.main([r'amber\src\test\python\core\storage\iceberg\test_iceberg_document.py::TestIcebergDocumentWithMockCatalog','-q','-p','no:cacheprovider']))"
   
   Before the source change: 13 passed and 1 failed. The new regression 
returned an injected row from the empty range.
   
   After the fix: 14 passed.
   
       C:\Users\carlo\texera\texera\.venv312\Scripts\ruff.exe check 
amber/src/main/python amber/src/test/python
       C:\Users\carlo\texera\texera\.venv312\Scripts\ruff.exe format --check 
amber/src/main/python amber/src/test/python
   
   Result: all checks passed and 213 files were already formatted.
   
   The production iterator probe used the same controlled record source before 
and after the change. Before, the zero end produced an infinite limit and 
returned the row. After, it produced a zero limit and an empty result.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: OpenAI Codex, GPT-5


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

Reply via email to