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

   ## Proposed changes
   Previously, get_char_len was repeatedly traversed during execution. Now, it 
is precomputed for optimization.
   
   ```C++
       static int execute(const StringRef& strl, const StringRef& strr) {
           if (strr.size == 0) {
               return 1;
           }
           StringSearch search(&strr);
           // Hive returns positions starting from 1.
           int loc = search.search(&strl);
           if (loc > 0) {
               size_t len = std::min((size_t)loc, strl.size);
               loc = simd::VStringFunctions::get_char_len(strl.data, len);
           }
           return loc + 1;
       }
   ```
   Issue Number: close #xxx
   
   <!--Describe your changes.-->
   
   


-- 
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: commits-unsubscr...@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to