Skip to content

Commit 980b092

Browse files
committed
resolve rebase conflict
1 parent a476c5a commit 980b092

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

sql/core/src/test/scala/org/apache/spark/sql/DateFunctionsSuite.scala

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -228,24 +228,6 @@ class DateFunctionsSuite extends QueryTest {
228228
Seq(Row(Date.valueOf("2015-07-30")), Row(Date.valueOf("2015-07-30"))))
229229
}
230230

231-
test("function current_date") {
232-
val df = Seq((1, 2), (3, 1)).toDF("a", "b")
233-
val d0 = DateTimeUtils.millisToDays(System.currentTimeMillis())
234-
val d1 = DateTimeUtils.fromJavaDate(df.select(current_date()).collect().head.getDate(0))
235-
val d2 = DateTimeUtils.fromJavaDate(
236-
ctx.sql("""SELECT CURRENT_DATE()""").collect().head.getDate(0))
237-
val d3 = DateTimeUtils.millisToDays(System.currentTimeMillis())
238-
assert(d0 <= d1 && d1 <= d2 && d2 <= d3 && d3 - d0 <= 1)
239-
}
240-
241-
test("function current_timestamp") {
242-
val df = Seq((1, 2), (3, 1)).toDF("a", "b")
243-
checkAnswer(df.select(countDistinct(current_timestamp())), Row(1))
244-
// TODO SPARK-9196: Execution in one query should return the same value
245-
assert(math.abs(ctx.sql("""SELECT CURRENT_TIMESTAMP()""").collect().head.getTimestamp(
246-
0).getTime - System.currentTimeMillis()) < 5000)
247-
}
248-
249231
test("function to_date") {
250232
val d1 = Date.valueOf("2015-07-22")
251233
val d2 = Date.valueOf("2015-07-01")

0 commit comments

Comments
 (0)