zhishengyk opened a new pull request, #59014:
URL: https://github.com/apache/doris/pull/59014

   ## Description
   Add `hamming_distance` function to calculate Hamming distance between two 
strings.
   
   ## Changes
   - **BE**: Add implementation in `function_string.cpp` with vectorized 
execution
   - **FE**: Add `HammingDistance.java` with `AlwaysNullable` (returns NULL if 
strings have different lengths)
   - **Test**: Add BE-UT test with `check_function_all_arg_comb` covering all 
argument combinations
   - **Test**: Add distributed regression test
   
   ## Behavior
   - Returns BIGINT: the number of positions where corresponding characters 
differ
   - Returns NULL if:
     - Either input is NULL
     - The two strings have different lengths
   
   ## Documentation
   Documentation PR: [link to your doc PR]
   
   ## Testing
   - BE-UT: `check_function_all_arg_comb` covers all argument combinations 
(vector_vector, scalar_vector, vector_scalar, scalar_scalar)
   - Regression test: `test_hamming_distance.groovy` covers various scenarios 
including NULL handling and different-length strings


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