clintropolis commented on a change in pull request #9181: Speed up String
first/last aggregators when folding isn't needed.
URL: https://github.com/apache/druid/pull/9181#discussion_r367736165
##########
File path:
core/src/test/java/org/apache/druid/java/util/common/StringUtilsTest.java
##########
@@ -246,4 +246,32 @@ public void testRpad()
Assert.assertEquals(s5, null);
}
+ @Test
+ public void testChop()
+ {
+ Assert.assertEquals("foo", StringUtils.chop("foo", 5));
+ Assert.assertEquals("fo", StringUtils.chop("foo", 2));
+ Assert.assertEquals("", StringUtils.chop("foo", 0));
+ Assert.assertEquals("smile 🙂 for", StringUtils.chop("smile 🙂 for the
camera", 14));
Review comment:
🙂
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]