Skip to content

Commit 753499d

Browse files
mn-mikkemn-mikke
authored andcommitted
[SPARK-23736][SQL] Fixing failing unit test from DDLSuite.
1 parent 11205af commit 753499d

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

  • sql
    • catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis
    • core/src/test/scala/org/apache/spark/sql/execution/command

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/unresolved.scala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,15 @@ case class UnresolvedOrdinal(ordinal: Int)
485485
* Concatenates multiple columns of the same type into one.
486486
* @param children Could be string, binary or array expressions
487487
*/
488+
@ExpressionDescription(
489+
usage = "_FUNC_(col1, col2, ..., colN) - Returns the concatenation of col1, col2, ..., colN.",
490+
examples = """
491+
Examples:
492+
> SELECT _FUNC_('Spark', 'SQL');
493+
SparkSQL
494+
> SELECT _FUNC_(array(1, 2, 3), array(4, 5), array(6));
495+
[1,2,3,4,5,6]
496+
""")
488497
case class UnresolvedConcat(children: Seq[Expression]) extends Expression
489498
with Unevaluable {
490499
override def dataType: DataType = throw new UnresolvedException(this, "dataType")

sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1664,10 +1664,10 @@ abstract class DDLSuite extends QueryTest with SQLTestUtils {
16641664
// STRING
16651665
checkAnswer(
16661666
sql("DESCRIBE FUNCTION 'concat'"),
1667-
Row("Class: org.apache.spark.sql.catalyst.expressions.Concat") ::
1667+
Row("Class: org.apache.spark.sql.catalyst.analysis.UnresolvedConcat") ::
16681668
Row("Function: concat") ::
1669-
Row("Usage: concat(str1, str2, ..., strN) - " +
1670-
"Returns the concatenation of str1, str2, ..., strN.") :: Nil
1669+
Row("Usage: concat(col1, col2, ..., colN) - " +
1670+
"Returns the concatenation of col1, col2, ..., colN.") :: Nil
16711671
)
16721672
// extended mode
16731673
checkAnswer(

0 commit comments

Comments
 (0)