Skip to content

Commit

Permalink
Fixed unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
rxin committed Jul 21, 2015
1 parent 52357e1 commit 53ee54f
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,17 +126,11 @@ class StringFunctionsSuite extends QueryTest {
val df = Seq(("aa%d%s", 123, "cc")).toDF("a", "b", "c")

checkAnswer(
df.selectExpr("printf(a, b, c)"),
df.select(format_string("aa%d%s", $"b", $"c")),
Row("aa123cc"))

val df2 = Seq(("aa%d%s".getBytes, 123, "cc")).toDF("a", "b", "c")

checkAnswer(
df2.select(format_string("a", $"b", $"c"), format_string("aa%d%s", $"b", $"c")),
Row("aa123cc", "aa123cc"))

checkAnswer(
df2.selectExpr("printf(a, b, c)"),
df.selectExpr("printf(a, b, c)"),
Row("aa123cc"))
}

Expand Down

0 comments on commit 53ee54f

Please sign in to comment.