Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2724,4 +2724,18 @@ class CollationSuite extends DatasourceV2SQLBase with AdaptiveSparkPlanHelper {
}
}

test("array_position respects schema-level non-binary collation") {
val q =
"""SELECT array_position(a, 'HELLO') AS pos
|FROM (
| SELECT CAST(array(
| CASE id WHEN 0 THEN 'hello'
| WHEN 1 THEN 'HELLO'
| ELSE 'world'
| END
| ) AS ARRAY<STRING COLLATE UTF8_LCASE>) AS a
| FROM range(3)
|)""".stripMargin
checkAnswer(sql(q), Seq(Row(1L), Row(1L), Row(0L)))
}
}