Skip to content

Commit

Permalink
fixed stupid test
Browse files Browse the repository at this point in the history
  • Loading branch information
tarekbecker committed Jun 24, 2015
1 parent 638596f commit 849fb41
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,17 +172,15 @@ class DataFrameFunctionsSuite extends QueryTest {
val d = new Date(sdf.parse("2015/04/08 13:10:15").getTime)
val ts = new Timestamp(sdf.parse("2013/04/08 13:10:15").getTime)

val df = Seq((d, d.toString, ts), (ts, d, d.toString), (d.toString, ts, d)).toDF("a", "b", "c")
val df = Seq((d, d.toString, ts)).toDF("a", "b", "c")

checkAnswer(
df.select(dateFormat("a", "y"), dateFormat("b", "y"), dateFormat("c", "y")),
Row("2015", "2015", "2013") :: Row("2013", "2015", "2015") ::
Row("2015", "2013", "2015") :: Nil)
Row("2015", "2015", "2013"))

checkAnswer(
df.selectExpr("dateFormat(a, 'y')", "dateFormat(b, 'y')", "dateFormat(c, 'y')"),
Row("2015", "2015", "2013") :: Row("2013", "2015", "2015") ::
Row("2015", "2013", "2015") :: Nil)
Row("2015", "2015", "2013"))
}

test("year") {
Expand Down

0 comments on commit 849fb41

Please sign in to comment.