spark-instrumented-optimizer/common
Maxim Gekk 44c1c03924 [SPARK-29607][SQL] Move static methods from CalendarInterval to IntervalUtils
### What changes were proposed in this pull request?
In the PR, I propose to move all static methods from the `CalendarInterval` class to the `IntervalUtils` object. All those methods are rewritten from Java to Scala.

### Why are the changes needed?
- For consistency with other helper methods. Such methods were placed to the helper object `IntervalUtils`, see https://github.com/apache/spark/pull/26190
- Taking into account that `CalendarInterval` will be fully exposed to users in the future (see https://github.com/apache/spark/pull/25022), it would be nice to clean it up by moving service methods to an internal object.

### Does this PR introduce any user-facing change?
No

### How was this patch tested?
- By moved tests from `CalendarIntervalSuite` to `IntervalUtilsSuite`
- By existing test suites

Closes #26261 from MaxGekk/refactoring-calendar-interval.

Authored-by: Maxim Gekk <max.gekk@gmail.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
2019-10-30 01:15:18 +08:00
..
kvstore Revert "Prepare Spark release v3.0.0-preview-rc1" 2019-10-28 22:32:34 -07:00
network-common Revert "Prepare Spark release v3.0.0-preview-rc1" 2019-10-28 22:32:34 -07:00
network-shuffle Revert "Prepare Spark release v3.0.0-preview-rc1" 2019-10-28 22:32:34 -07:00
network-yarn Revert "Prepare Spark release v3.0.0-preview-rc1" 2019-10-28 22:32:34 -07:00
sketch Revert "Prepare Spark release v3.0.0-preview-rc1" 2019-10-28 22:32:34 -07:00
tags Revert "Prepare Spark release v3.0.0-preview-rc1" 2019-10-28 22:32:34 -07:00
unsafe [SPARK-29607][SQL] Move static methods from CalendarInterval to IntervalUtils 2019-10-30 01:15:18 +08:00