Skip to content

Conversation

@yaooqinn
Copy link
Member

@yaooqinn yaooqinn commented Apr 28, 2020

What changes were proposed in this pull request?

The implementation of TimeSub for the operation of timestamp subtracting interval is almost repetitive with TimeAdd. We can replace it with TimeAdd(l, -r) since there are equivalent.

Suggestion from #28310 (comment)

Besides, the Coercion rules for TimeAdd/TimeSub(date, interval) are useless anymore, so remove them in this PR since they are touched in this PR.

Why are the changes needed?

remove redundant and useless code for easy maintenance

Does this PR introduce any user-facing change?

Yes, the SQL string of datetime - interval become datetime + (- interval)

How was this patch tested?

modified existing unit tests.

@SparkQA
Copy link

SparkQA commented Apr 28, 2020

Test build #121946 has finished for PR 28381 at commit 17b0438.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@yaooqinn
Copy link
Member Author

retest this please

@yaooqinn
Copy link
Member Author

cc @cloud-fan, please also notice that the flakiness of CliSuite is still there according the test failure above.

@SparkQA
Copy link

SparkQA commented Apr 28, 2020

Test build #121960 has finished for PR 28381 at commit 17b0438.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@yaooqinn
Copy link
Member Author

retest this please

@SparkQA
Copy link

SparkQA commented Apr 28, 2020

Test build #121972 has finished for PR 28381 at commit 17b0438.

  • 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 beec8d5 Apr 28, 2020
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.

3 participants