davidradl commented on code in PR #29123:
URL: https://github.com/apache/flink/pull/29123#discussion_r3990643061
##########
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/expressions/ScalarFunctionsTest.scala:
##########
@@ -106,6 +106,26 @@ class ScalarFunctionsTest extends ScalarTypesTestBase {
// invalid length
($"f0".overlay("IS", 6, -1), "OVERLAY(f0 PLACING 'IS' FROM 6 FOR -1)",
"This IS"),
+ // a zero length replaces nothing, so the whole tail survives
+ ("abcdef".overlay("X", 2, 0), "OVERLAY('abcdef' PLACING 'X' FROM 2 FOR
0)", "aXbcdef"),
+ ("abcdef".overlay("X", 1, 0), "OVERLAY('abcdef' PLACING 'X' FROM 1 FOR
0)", "Xabcdef"),
+ ("abcdef".overlay("X", 6, 0), "OVERLAY('abcdef' PLACING 'X' FROM 6 FOR
0)", "abcdeXf"),
+
+ // a supplementary-plane character is one character and is never split
into half a pair
Review Comment:
I think you are addressing point 1. If you think it is worth adding a test -
please add.
What are your thoughts on point 2?
--
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]