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

   ### What changes were proposed in this PR?
   
   Convert Python binary values to Java signed-byte values before applying the 
existing Java-compatible array hash.
   
   Before: with three receivers, binary key `0xFF` produced Python hash 317 and 
Scala hash 61, selecting different workers.
   
   After: both hashes are 61 and both select worker 1.
   
   ### Any related issues, documentation, discussions?
   
   Closes #8179
   
   ### How was this PR tested?
   
   The new signed-boundary regression was red before the source change with two 
failures and one pass. After the fix, `0x7F`, `0x80`, and `0xFF` all pass.
   
   ```text
   python -c "import sys,pytest; 
sys.path[:0]=[r'<worktree>\amber\src\main\python',r'<checkout>\amber\src\main\python'];
 raise 
SystemExit(pytest.main([r'amber/src/test/python/core/models/test_tuple.py::TestTuple::test_binary_hash_uses_java_signed_bytes','-q','-p','no:cacheprovider']))"
   ```
   
   The remaining tuple tests and the complete partitioner suite pass:
   
   ```text
   python -c "import sys,pytest; 
sys.path[:0]=[r'<worktree>\amber\src\main\python',r'<checkout>\amber\src\main\python'];
 raise 
SystemExit(pytest.main([r'amber/src/test/python/core/models/test_tuple.py','-k','not
 test_hash','-q','-p','no:cacheprovider']))"
   python -c "import sys,pytest; 
sys.path[:0]=[r'<worktree>\amber\src\main\python',r'<checkout>\amber\src\main\python'];
 raise 
SystemExit(pytest.main([r'amber/src/test/python/core/models/test_tuple.py::TestTuple::test_hash_treats_none_fields_as_zero',r'amber/src/test/python/core/architecture/sendsemantics/test_partitioners.py','-q','-p','no:cacheprovider']))"
   ```
   
   Results: 104 tuple tests passed in the first run, then the separately 
selected null-hash test and all 35 partitioner tests passed. The existing 
`TestTuple.test_hash` fixture is excluded because its naive epoch timestamp 
fails on Windows; PR #8174 makes those timestamps explicitly UTC.
   
   ```text
   ruff check amber/src/main/python amber/src/test/python
   ruff format --check amber/src/main/python amber/src/test/python
   ```
   
   Ruff checked 213 files successfully. The fixed production hash partitioner 
selected receiver B for `0xFF`, matching Scala bucket 1.
   
   ### 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