Python tuples ignore schema during equality checks
- Dominant language
- Scala
- Stars
- 314
- Forks
- 187
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 214
Description
### Feature Summary
Python `Tuple.__eq__` compares field names and values but ignores the schema, while `Tuple.__hash__` uses schema types. Equal-looking values under different schemas can therefore compare equal and produce different hashes, violating the Python equality and hash contract.
Expected behavior:
Tuple equality includes schema identity, matching the values used to calculate its hash.
Reproduction evidence:
Compare an `INTEGER` tuple containing 1 with a `DOUBLE` tuple containing 1.0.
Before: equality is true, hashes are 32 and 1072693279, and an equal dictionary key cannot be found
After: different schemas compare unequal, while same-schema tuples remain equal and hash-compatible
Version and commit evidence:
Current `main` at 70c21145887920528d7d5540e3fb790b43e8b759.
**Commit Hash (Optional)**
`70c21145887920528d7d5540e3fb790b43e8b759`
### Proposed Solution or Design
Expected behavior:
### Affected Area
Workflow Engine (Amber)
Contributor guide
Assessment
This issue has not been assessed yet.