Skip to content

Commit aca511c

Browse files
mn-mikkemn-mikke
authored andcommitted
[SPARK-23736][SQL] Fixing Python test
1 parent ad17d49 commit aca511c

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

python/pyspark/sql/functions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2098,6 +2098,7 @@ def sort_array(col, asc=True):
20982098

20992099

21002100
@since(1.5)
2101+
@ignore_unicode_prefix
21012102
def reverse(col):
21022103
"""
21032104
Collection function: returns a reversed string or an array with reverse order of elements.

sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CollectionExpressionsSuite.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class CollectionExpressionsSuite extends SparkFunSuite with ExpressionEvalHelper
107107
}
108108

109109
test("Reverse") {
110-
// Simple-type elements
110+
// Primitive-type elements
111111
val ai0 = Literal.create(Seq(2, 1, 4, 3), ArrayType(IntegerType))
112112
val ai1 = Literal.create(Seq(2, 1, 3), ArrayType(IntegerType))
113113
val ai2 = Literal.create(Seq(null, 1, null, 3), ArrayType(IntegerType))
@@ -126,7 +126,7 @@ class CollectionExpressionsSuite extends SparkFunSuite with ExpressionEvalHelper
126126
checkEvaluation(Reverse(ai6), Seq.empty)
127127
checkEvaluation(Reverse(ai7), null)
128128

129-
// Complex-type elements
129+
// Non-primitive-type elements
130130
val as0 = Literal.create(Seq("b", "a", "d", "c"), ArrayType(StringType))
131131
val as1 = Literal.create(Seq("b", "a", "c"), ArrayType(StringType))
132132
val as2 = Literal.create(Seq(null, "a", null, "c"), ArrayType(StringType))

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ class DataFrameFunctionsSuite extends QueryTest with SharedSQLContext {
469469
Seq(Row(Seq(null, 2, null, 1)))
470470
)
471471

472-
// Array test cases (complex-type elements)
472+
// Array test cases (non-primitive-type elements)
473473
val sdf = Seq(
474474
Seq("c", "a", "b"),
475475
Seq("b", null, "c", null),

0 commit comments

Comments
 (0)