Commit Graph

23 Commits

Author SHA1 Message Date
285d44cd48 [BUG] Fix potential overflow exception when do money format for double (#6408)
* [BUG] Fix potential overflow bug when do money format for double

Co-authored-by: caiconghui <caiconghui@xiaomi.com>
2021-08-15 18:40:26 +08:00
2f5b06ae70 [Bug][Optimize] Fix race condition problem and optimize do_money_format function (#6350)
* [Bug][Optimize] Fix race condition problem and optimize do_money_format function

Co-authored-by: caiconghui <caiconghui@xiaomi.com>
2021-08-06 16:29:34 +08:00
13ef2c9e1d [Function][Enhance] lower/upper case transfer function vectorized (#6253)
Currently, the function lower()/upper() can only handle one char at a time.
A vectorized function has been implemented, it makes performance 2 times faster. Here is the performance test:

The length of char: 26, test 100 times
vectorized-function-cost: 99491 ns
normal-function-cost: 134766 ns

The length of char: 260, test 100 times
vectorized-function-cost: 179341 ns
normal-function-cost: 344995 ns
2021-07-26 09:38:07 +08:00
c929a8935a [Feature][Function] support bit_length function (#6140)
support bit_length function like mysql
2021-07-08 09:40:30 +08:00
739c0268ff [refactor] Remove decimal v1 related code from code base (#6079)
remove ALL DECIMAL V1 type code , this is a part of #6073
2021-07-07 10:26:32 +08:00
d790cc6a50 [BUG] Fixed the problem that substring function may access illegal address (#5952) 2021-06-03 18:38:10 +08:00
11c0aafa5c [UT] Speed up BE unit test (#5131)
There are some long loops and sleeps in unit tests, it will cost a
very long time to run all unit tests, especially run in TSAN mode.
This patch speed up unit tests by shortening long loops and sleeps,
on my environment all unit tests finished in 1 minite. It's useful
to do basic functional unit tests.
You can switch to run in this mode by adding a new environment variable
'DORIS_ALLOW_SLOW_TESTS'. For example, you can set:
export DORIS_ALLOW_SLOW_TESTS=1
and also you can disable it by setting:
export DORIS_ALLOW_SLOW_TESTS=0
2020-12-27 22:19:56 +08:00
6fedf5881b [CodeFormat] Clang-format cpp sources (#4965)
Clang-format all c++ source files.
2020-11-28 18:36:49 +08:00
c00a5cb543 [Bug] Fix the core problem of function split_part and add the UT of core case (#4721)
issue:#4720
2020-10-13 10:09:39 +08:00
b1853caeed [UDF] Improve performance of function money_format (#4672)
Use static local variable instead of create it every calls.
Time cost of the new added unit benchmark test could reduce
from about 60 seconds to 10 seconds.
2020-09-28 13:39:41 +08:00
1a30bcbf36 [SQL Function][Bug] Fix parse_url() bug (#4429)
The parameter 'part' of parse_url function does not support lower case, and parse protocol not right.
And This function does not support parse 'port'. 
This PR tries to make parse_url function case insensitive and support parse 'port'.

The issue: #4451
2020-09-03 17:06:09 +08:00
bfb39a2826 [SQL][Function] Add replace() function (#4347)
replace is an user defined function, which is to replace all old substrings with a new substring in a string, as follow:
mysql> select replace("http://www.baidu.com:9090", "9090", "");
+------------------------------------------------------+
| replace('http://www.baidu.com:9090', '9090', '') |
+------------------------------------------------------+
| http://www.baidu.com: |
+------------------------------------------------------+
2020-08-20 09:28:53 +08:00
fdd65c50c4 [Bug] fix mem_tracker use-after-free & add UT for it (#3899) 2020-06-20 19:08:53 +08:00
ba7d2dbf7b [Function] Support utf-8 encoding in instr, locate, locate_pos, lpad, rpad (#3638)
Support utf-8 encoding for string function `instr`, `locate`, `locate_pos`, `lpad`, `rpad`
and add unit test for them
2020-05-22 14:34:26 +08:00
a656a7ddd4 Support append_trailing_char_if_absent function (#3439) 2020-05-09 08:59:34 +08:00
94b3a2bd50 [Bug] Fix string functions not support multibyte string (#3345)
Let string functions support utf8 encoding
2020-05-08 12:52:46 +08:00
4a7a88ede1 [LSAN] Fix some memory leak detected by LSAN (#3326) 2020-04-22 22:59:44 +08:00
0d1e28746e [Function] Support null_or_empty function (#2977)
It returns true if the string is empty or NULL. Otherwise it returns false.
2020-03-01 17:35:45 +08:00
89c7234c1c Support starts_with (str, prefix) function (#2813)
Support starts_with function
2020-01-21 14:09:08 +08:00
f071d5a307 Support ends_with function (#2746) 2020-01-14 22:37:20 +08:00
a9e8113b82 Fix heap-buffer-overflow in split_part() function in StringFunctions (#1482) 2019-07-15 23:00:37 +08:00
98bd4b4565 Add string function split_part (#1451) 2019-07-10 09:47:33 +08:00
b2a022b348 Add money_format function (#1064) 2019-04-29 18:31:24 +08:00