Skip to content

[SPARK-58502][SQL] Make in-limit SQL test deterministic - #57713

Open
vladimirg-db wants to merge 3 commits into
apache:branch-4.xfrom
vladimirg-db:make-in-limit-test-deterministic-4x
Open

[SPARK-58502][SQL] Make in-limit SQL test deterministic#57713
vladimirg-db wants to merge 3 commits into
apache:branch-4.xfrom
vladimirg-db:make-in-limit-test-deterministic-4x

Conversation

@vladimirg-db

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Add deterministic ordering to result-sensitive subqueries in in-limit.sql that combine IN or NOT IN with LIMIT or OFFSET. Regenerate the execution and analyzer golden files.

This is the branch-4.x-only version of #57696, requested in #57696 (comment) for Spark 4.3.0.

Why are the changes needed?

Without an ordering, LIMIT and OFFSET may select different membership values under different physical row orders, making the golden results flaky. Ordering by the projected membership column makes tied rows semantically equivalent.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

build/sbt "sql/testOnly org.apache.spark.sql.SQLQueryTestSuite -- -z in-limit.sql"

The suite passed both while regenerating the golden files and in a verification rerun (2/2 tests each).

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

Generated-by: OpenAI Codex (GPT-5)

@uros-b

uros-b commented Aug 3, 2026

Copy link
Copy Markdown
Member

Thank you @vladimirg-db! Let's wait for CI

@vladimirg-db
vladimirg-db force-pushed the make-in-limit-test-deterministic-4x branch from d605423 to deb9a30 Compare August 3, 2026 11:57
Comment thread connector/credential-aws/pom.xml Outdated
@uros-b

uros-b commented Aug 4, 2026

Copy link
Copy Markdown
Member

@vladimirg-db Please resolve conflicts

…st-deterministic-4x

# Conflicts:
#	connector/credential-aws/pom.xml
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.

2 participants