Yukang-Lian commented on code in PR #60890:
URL: https://github.com/apache/doris/pull/60890#discussion_r2870914499


##########
regression-test/suites/query_p0/sql_functions/string_functions/test_string_function.groovy:
##########
@@ -413,6 +413,17 @@ suite("test_string_function", "arrow_flight_sql") {
     qt_sql_func_char9 """ select char(0) = ' '; """
     qt_sql_func_char10 """ select char(0) = '\0'; """
 
+    qt_hamming_distance1 """ select hamming_distance('karolin', 'kathrin'); """
+    qt_hamming_distance2 """ select hamming_distance('1011101', '1001001'); """
+    qt_hamming_distance3 """ select hamming_distance('你好a', '你坏b'); """
+    qt_hamming_distance4 """ select hamming_distance(null, 'abc'); """
+    qt_hamming_distance5 """ select hamming_distance('abc', null); """
+
+    test {
+        sql """ select hamming_distance('abc', 'ab'); """
+        exception "hamming_distance requires strings of equal length"
+    }
+

Review Comment:
   Missing .out file for regression tests



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/executable/StringArithmetic.java:
##########
@@ -842,6 +842,37 @@ public static Expression strcmp(StringLikeLiteral first, 
StringLikeLiteral secon
         }
     }
 
+        /**

Review Comment:
   incorrect indentation



##########
be/src/vec/functions/function_string.cpp:
##########
@@ -1446,6 +1446,9 @@ void register_function_string(SimpleFunctionFactory& 
factory) {
     factory.register_function<FunctionMakeSet>();
     factory.register_function<FunctionExportSet>();
     factory.register_function<FunctionUnicodeNormalize>();
+    factory.register_function<FunctionOverlay>();
+    factory.register_function<FunctionStrcmp>();

Review Comment:
   rebase onto latest master and remove these two lines from the PR.



-- 
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]

Reply via email to