apache / apache/texera

Python tables with different row counts compare equal

Open
#8,195 1 comment 0 reactions 1 assignee Claimed by @carloea2 View on GitHub
Dominant language
Scala
Stars
314
Forks
187
Avg merge
1d 21h
Merged PRs (30d)
214

Description

### Feature Summary

Python Table equality compares row iterators with zip but does not compare their lengths. Zip stops at the shorter input, so tables with the same prefix compare equal even when one contains additional workflow rows. An empty table also compares equal to any non-empty table.

Before: one row equals two matching-prefix rows in both directions, and zero rows equals two rows.

After: row counts must match before row values are compared. Equal tables still compare equal.

Reproduction evidence:

1. Construct one Table containing id 1.
2. Construct another Table containing id 1 and id 2.
3. Compare the tables in either direction.
4. Observe True even though the row counts differ.
5. Compare an empty Table with the two-row Table and observe True again.

Version and commit evidence:

1.3.0-incubating-SNAPSHOT (main)

**Commit Hash (Optional)**
70c21145887920528d7d5540e3fb790b43e8b759

## Relevant log output

shorter_rows=1
longer_rows=2
shorter_equals_longer=True
longer_equals_shorter=True
empty_equals_longer=True

### Proposed Solution or Design

After: row counts must match before row values are compared. Equal tables still compare equal.

### Affected Area

Workflow Engine (Amber)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.