Skip to content

Conversation

@HyukjinKwon
Copy link
Member

What changes were proposed in this pull request?

This PR proposes to add a note in the migration guide. See #25108 (comment)

How was this patch tested?

N/A

@HyukjinKwon
Copy link
Member Author

HyukjinKwon commented Jul 22, 2019

cc @gatorsmile and @cloud-fan

@SparkQA
Copy link

SparkQA commented Jul 22, 2019

Test build #107983 has finished for PR 25224 at commit 3aaec73.

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

- Since Spark 3.0, substitution order of nested WITH clauses is changed and an inner CTE definition takes precedence over an outer. In version 2.4 and earlier, `WITH t AS (SELECT 1), t2 AS (WITH t AS (SELECT 2) SELECT * FROM t) SELECT * FROM t2` returns `1` while in version 3.0 it returns `2`. The previous behaviour can be restored by setting `spark.sql.legacy.ctePrecedence.enabled` to `true`.

- Since Spark 3.0, the `add_months` function does not adjust the resulting date to a last day of month if the original date is a last day of months. For example, `select add_months(DATE'2019-02-28', 1)` results `2019-03-28`. In Spark version 2.4 and earlier, the resulting date is adjusted when the original date is a last day of months. For example, adding a month to `2019-02-28` resultes in `2019-03-31`.
- Since Spark 3.0, the `add_months` function does not adjust the resulting date to a last day of month if the original date is a last day of months. For example, `select add_months(DATE'2019-02-28', 1)` results `2019-03-28`. In Spark version 2.4 and earlier, the resulting date is adjusted when the original date is a last day of months. For example, adding a month to `2019-02-28` results in `2019-03-31`.
Copy link
Member Author

Choose a reason for hiding this comment

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

Just a typo fix from resultes -> results.

@SparkQA
Copy link

SparkQA commented Jul 22, 2019

Test build #107985 has finished for PR 25224 at commit be8ae40.

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

@cloud-fan
Copy link
Contributor

thanks, merging to master!

@cloud-fan cloud-fan closed this in e3f7ca3 Jul 22, 2019
yiheng pushed a commit to yiheng/spark that referenced this pull request Jul 24, 2019
…UDF's internal behaviour change

## What changes were proposed in this pull request?

This PR proposes to add a note in the migration guide. See apache#25108 (comment)

## How was this patch tested?

N/A

Closes apache#25224 from HyukjinKwon/SPARK-28321-doc.

Lead-authored-by: HyukjinKwon <[email protected]>
Co-authored-by: Hyukjin Kwon <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
@HyukjinKwon HyukjinKwon deleted the SPARK-28321-doc branch March 3, 2020 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants