You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/08/03 10:22:25 UTC

[GitHub] [arrow] pitrou commented on a change in pull request #10855: ARROW-12946: [C++] String swap case kernel

pitrou commented on a change in pull request #10855:
URL: https://github.com/apache/arrow/pull/10855#discussion_r681629459



##########
File path: cpp/src/arrow/compute/kernels/scalar_string_test.cc
##########
@@ -395,6 +395,12 @@ TYPED_TEST(TestStringKernels, AsciiLower) {
                    "[\"aaazzæÆ&\", null, \"\", \"bbb\"]");
 }
 
+TYPED_TEST(TestStringKernels, AsciiSwapCase) {
+  this->CheckUnary("ascii_swapcase", "[]", this->type(), "[]");
+  this->CheckUnary("ascii_swapcase", "[\"aAazZæÆ&\", null, \"\", \"BbB\"]", this->type(),
+                   "[\"AaAZzæÆ&\", null, \"\", \"bBb\"]");

Review comment:
       Can you add characters that don't have a casing here?
   

##########
File path: cpp/src/arrow/compute/kernels/scalar_string_test.cc
##########
@@ -493,6 +499,23 @@ TYPED_TEST(TestStringKernels, Utf8Lower) {
                                   CallFunction("utf8_lower", {invalid_input}));
 }
 
+TYPED_TEST(TestStringKernels, Utf8SwapCase) {
+  this->CheckUnary("utf8_swapcase", "[\"aAazZæÆ&\", null, \"\", \"b\"]", this->type(),
+                   "[\"AaAZzÆæ&\", null, \"\", \"B\"]");

Review comment:
       Same here: add characters that don't have a casing.




-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org