Skip to content

Comments

[SPARK-37519][SQL] Support Relation With LateralView#34789

Closed
TongWei1105 wants to merge 1 commit intoapache:masterfrom
TongWei1105:SPARK-37519
Closed

[SPARK-37519][SQL] Support Relation With LateralView#34789
TongWei1105 wants to merge 1 commit intoapache:masterfrom
TongWei1105:SPARK-37519

Conversation

@TongWei1105
Copy link
Contributor

What changes were proposed in this pull request?

Users can more convenient to use LATERAL VIEW with relation instead of creating a subqury

Why are the changes needed?

Before this change:

SELECT *
FROM ( SELECT CC1.C_AGE1 FROM PERSON1 AS P1
LATERAL VIEW EXPLODE(ARRAY(30, 60)) CC1 AS C_AGE1 ) AS P1
LEFT JOIN PERSON2 P2 ON P1.ID = P2.ID  AND P1.C_AGE1=P2.AGE;

After:

SELECT *
FROM PERSON1 AS P1
LATERAL VIEW EXPLODE(ARRAY(30, 60)) CC1 AS C_AGE1
LEFT JOIN PERSON2 P2 ON P1.ID = P2.ID  AND CC1.C_AGE1=P2.AGE;

Does this PR introduce any user-facing change?

How was this patch tested?

Add unit tests

@github-actions github-actions bot added the SQL label Dec 3, 2021
@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@TongWei1105 TongWei1105 changed the title Support Relation With LateralView [SPARK-37519][SQL]Support Relation With LateralView Dec 3, 2021
@HyukjinKwon HyukjinKwon changed the title [SPARK-37519][SQL]Support Relation With LateralView [SPARK-37519][SQL] Support Relation With LateralView Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants