Skip to content

Commit f512c5f

Browse files
committed
[SPARK-9154][SQL] build fix
1 parent a943d3e commit f512c5f

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringOperations.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ case class StringFormat(children: Expression*) extends Expression with ImplicitC
487487
private def args: Seq[Expression] = children.tail
488488

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

492492

493493
override def eval(input: InternalRow): Any = {

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -120,16 +120,6 @@ class StringFunctionsSuite extends QueryTest {
120120
checkAnswer(
121121
df.selectExpr("printf(a, b, c)"),
122122
Row("aa123cc"))
123-
124-
val df2 = Seq(("aa%d%s".getBytes, 123, "cc")).toDF("a", "b", "c")
125-
126-
checkAnswer(
127-
df2.select(formatString($"a", $"b", $"c"), formatString("aa%d%s", "b", "c")),
128-
Row("aa123cc", "aa123cc"))
129-
130-
checkAnswer(
131-
df2.selectExpr("printf(a, b, c)"),
132-
Row("aa123cc"))
133123
}
134124

135125
test("string instr function") {

0 commit comments

Comments
 (0)