Skip to content

[SPARK-24341][FOLLOWUP][DOCS] Add migration note for IN subqueries behavior#22469

Closed
mgaido91 wants to merge 2 commits intoapache:masterfrom
mgaido91:SPARK-24341_followup
Closed

[SPARK-24341][FOLLOWUP][DOCS] Add migration note for IN subqueries behavior#22469
mgaido91 wants to merge 2 commits intoapache:masterfrom
mgaido91:SPARK-24341_followup

Conversation

@mgaido91
Copy link
Contributor

What changes were proposed in this pull request?

The PR updates the migration guide in order to explain the changes introduced in the behavior of the IN operator with subqueries, in particular, the improved handling of struct attributes in these situations.

How was this patch tested?

NA

@mgaido91
Copy link
Contributor Author

cc @cloud-fan

@SparkQA
Copy link

SparkQA commented Sep 19, 2018

Test build #96258 has finished for PR 22469 at commit fed3911.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.


## Upgrading From Spark SQL 2.3 to 2.4

- Since Spark 2.4, when there is a struct field in front of the IN operator, the inner query must contain a struct field as well. In previous versions, instead, the fields of the struct were compared to the output of the inner query. Eg. if `a` is a `struct(a string, b int)`, in Spark 2.4 `a in (select (1 as a, 'a' as b) from range(1))` is a valid query, while `a in (select 1, 'a' from range(1))` is not. In previous version it was the opposite.
Copy link
Contributor

Choose a reason for hiding this comment

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

IN operator => IN operator before a subquery

@cloud-fan
Copy link
Contributor

LGTM, thanks for adding it!

@mgaido91
Copy link
Contributor Author

thank you for pointing this out @cloud-fan

@SparkQA
Copy link

SparkQA commented Sep 19, 2018

Test build #96286 has finished for PR 22469 at commit d444073.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@cloud-fan
Copy link
Contributor

thanks, merging to master/2.4!

asfgit pushed a commit that referenced this pull request Sep 20, 2018
…havior

## What changes were proposed in this pull request?

The PR updates the migration guide in order to explain the changes introduced in the behavior of the IN operator with subqueries, in particular, the improved handling of struct attributes in these situations.

## How was this patch tested?

NA

Closes #22469 from mgaido91/SPARK-24341_followup.

Authored-by: Marco Gaido <marcogaido91@gmail.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit 8aae49a)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
@asfgit asfgit closed this in 8aae49a Sep 20, 2018
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