Skip to content

Commit

Permalink
[SPARK-9154][SQL] build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tarekbecker committed Jul 21, 2015
1 parent a943d3e commit f512c5f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ case class StringFormat(children: Expression*) extends Expression with ImplicitC
private def args: Seq[Expression] = children.tail

override def inputTypes: Seq[AbstractDataType] =
children.zipWithIndex.map(x => if (x._2 == 0) StringType else AnyDataType)
StringType :: List.fill(children.size - 1)(AnyDataType)


override def eval(input: InternalRow): Any = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,6 @@ class StringFunctionsSuite extends QueryTest {
checkAnswer(
df.selectExpr("printf(a, b, c)"),
Row("aa123cc"))

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

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

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

test("string instr function") {
Expand Down

0 comments on commit f512c5f

Please sign in to comment.