Skip to content

Comments

[SPARK-55666][PYTHON][TEST] Fix flaky connect tests due to non-deterministic row order#54460

Open
Yicong-Huang wants to merge 1 commit intoapache:masterfrom
Yicong-Huang:SPARK-55666/fix/test-join-ambiguous-cols-row-order
Open

[SPARK-55666][PYTHON][TEST] Fix flaky connect tests due to non-deterministic row order#54460
Yicong-Huang wants to merge 1 commit intoapache:masterfrom
Yicong-Huang:SPARK-55666/fix/test-join-ambiguous-cols-row-order

Conversation

@Yicong-Huang
Copy link
Contributor

@Yicong-Huang Yicong-Huang commented Feb 24, 2026

What changes were proposed in this pull request?

Use assertDataFrameEqual in test_join_ambiguous_cols to avoid non-deterministic row order failures.

Why are the changes needed?

Many tests use assertEqual(cdf.collect(), sdf.collect()) to compare results with bag semantic. Since bags do not guarantee row order, this can fail non-deterministically (flaky test).

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Existing test

Was this patch authored or co-authored using generative AI tooling?

No.

@Yicong-Huang Yicong-Huang force-pushed the SPARK-55666/fix/test-join-ambiguous-cols-row-order branch from c3e9c5b to 9706860 Compare February 25, 2026 01:34
@Yicong-Huang
Copy link
Contributor Author

cc @HyukjinKwon

Copy link
Member

@ueshin ueshin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, pending tests.

@Yicong-Huang Yicong-Huang force-pushed the SPARK-55666/fix/test-join-ambiguous-cols-row-order branch from 9706860 to c2480bf Compare February 25, 2026 02:00
@Yicong-Huang Yicong-Huang changed the title [SPARK-55666][PYTHON][TEST] Fix flaky test_join_ambiguous_cols due to non-deterministic row order [SPARK-55666][PYTHON][TEST] Fix flaky connect tests due to non-deterministic row order Feb 25, 2026
@Yicong-Huang Yicong-Huang force-pushed the SPARK-55666/fix/test-join-ambiguous-cols-row-order branch from c2480bf to b069942 Compare February 25, 2026 02:13
@Yicong-Huang Yicong-Huang force-pushed the SPARK-55666/fix/test-join-ambiguous-cols-row-order branch from b069942 to e7bc195 Compare February 25, 2026 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants