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

   ### What changes were proposed in this PR?
   
   Require two Python Tables to have the same row count before comparing their 
rows. This prevents zip from hiding extra rows in either operand.
   
   Before: a table matched any longer table with the same prefix, and an empty 
table matched a non-empty table.
   
   After: unequal row counts compare false in both directions, while equal 
tables still compare true.
   
   ### Any related issues, documentation, discussions?
   
   Closes #8195
   
   ### 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-table-length-equality\amber\src\main\python',r'C:\Users\carlo\texera\texera\amber\src\main\python'];
 raise 
SystemExit(pytest.main([r'amber\src\test\python\core\models\test_table.py','-q','-p','no:cacheprovider']))"
   
   Before the source change: 18 passed and 1 failed. The failure reproduced the 
prefix truncation.
   
   After the fix: 19 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.
   
   A broader Python model run reported 316 passed, 1 expected failure, and the 
unrelated upstream Windows epoch timestamp error already covered by PR #8174.
   
   The live production comparison now returns false for one versus two rows in 
both directions and for empty versus non-empty, while an equal two-row copy 
returns true.
   
   ### 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