Tables with different row counts compare equal
- Dominant language
- Scala
- Stars
- 314
- Forks
- 187
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 214
Description
### Feature Summary
`Table.__eq__` compares rows with `zip`, which stops at the shorter input. Tables with the same prefix but different row counts therefore compare equal in both directions.
Before: compare one row with two rows -> zip checks only the shared prefix -> equality returns true
After: compare row counts first -> different-sized tables return false
Expected behavior:
Tables with different row counts should not compare equal, even when every row in the shorter table matches the longer table's prefix.
Reproduction evidence:
Compare `Table([{"x": 1}])` with `Table([{"x": 1}, {"x": 2}])`.
Observed on `70c21145887920528d7d5540e3fb790b43e8b759`:
```text
short_equals_long=True
long_equals_short=True
short_equals_different=False
lengths=1 2
```
Version and commit evidence:
1.3.0-incubating-SNAPSHOT (main)
**Commit Hash (Optional)**
`70c21145887920528d7d5540e3fb790b43e8b759`
### Proposed Solution or Design
After: compare row counts first -> different-sized tables return false
Expected behavior:
### Affected Area
Workflow Engine (Amber)
Contributor guide
Assessment
This issue has not been assessed yet.