[SPARK-46179 FOLLOW UP][TESTS] Remove --ONLY_IF spark from subquery SQL tests to enable PostgreSQL cross-DBMS testing#57172
Open
andylam-db wants to merge 2 commits into
Conversation
…sts to enable PostgreSQL cross-DBMS testing Remove the `--ONLY_IF spark` guard from the IN/EXISTS subquery golden-file tests and rewrite their temporary-view DDL into the portable `CREATE TEMPORARY VIEW t(cols) AS VALUES ...` form with ANSI-compatible literals, so the same query files can run against PostgreSQL under CrossDbmsQueryTestSuite. Also add debug/error logging to CrossDbmsQueryTestSuite to make per-query cross-DBMS mismatches easier to diagnose. Golden .out files still need to be regenerated with SPARK_GENERATE_GOLDEN_FILES=1.
Generated with SPARK_GENERATE_GOLDEN_FILES=1 after removing --ONLY_IF spark and rewriting the temporary-view DDL to the portable CREATE TEMPORARY VIEW t(cols) AS VALUES form. The literal-type changes (dropping S/L/float/BD suffixes) shift column types (smallint->int, float/double->decimal), which is reflected in the regenerated schemas.
dongjoon-hyun
requested changes
Jul 9, 2026
dongjoon-hyun
left a comment
Member
There was a problem hiding this comment.
You need to file a JIRA issue before making it ready, @andylam-db .
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This PR removes the
--ONLY_IF sparkdirective from the IN/EXISTS subquery golden-file tests undersql/core/src/test/resources/sql-tests/inputs/subquery/and rewrites their temporary-view DDL from the Spark-specificform into the portable
form, using ANSI-compatible literals (single-quoted strings, no
S/L/D/E2BDtype suffixes). This lets the query files run against PostgreSQL throughCrossDbmsQueryTestSuite.Why are the changes needed?
The subquery test inputs were guarded by
--ONLY_IF spark, so they never exercised the cross-DBMS path. Their view DDL relied on Spark-only syntax (typed literal suffixes,select * from values ... as t(...)) that PostgreSQL rejects. Making the DDL portable lets these tests validate Spark's subquery semantics against PostgreSQL as an independent oracle, catching correctness divergences.Does this PR introduce any user-facing change?
No. Test-only change.
How was this patch tested?
Existing golden-file tests. The golden
.outfiles are regenerated withSPARK_GENERATE_GOLDEN_FILES=1and the PostgreSQL cross-DBMS run is exercised viaCrossDbmsQueryTestSuite.Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Anthropic)