uros-db commented on code in PR #45643:
URL: https://github.com/apache/spark/pull/45643#discussion_r1565771738
##########
common/unsafe/src/test/java/org/apache/spark/unsafe/types/CollationSupportSuite.java:
##########
@@ -249,6 +249,86 @@ public void testEndsWith() throws SparkException {
assertEndsWith("äbćδe", "ÄBcΔÉ", "UNICODE_CI", false);
}
+ private void assertStringInstr(String string, String substring, String
collationName,
+ Integer value) throws SparkException {
+ UTF8String str = UTF8String.fromString(string);
+ UTF8String substr = UTF8String.fromString(substring);
+ int collationId = CollationFactory.collationNameToId(collationName);
+
+ assertEquals(CollationSupport.StringInstr.exec(str, substr, collationId) +
1, value);
Review Comment:
```suggestion
assertEquals(expected, CollationSupport.StringInstr.exec(str, substr,
collationId) + 1);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]