e9052e2180
[cherry-pick](branch-21) fix mod function cause core dump ( #37999 ) ( #38308 )
...
## Proposed changes
cherry-pick from master https://github.com/apache/doris/pull/37999
<!--Describe your changes.-->
## Proposed changes
Issue Number: close #xxx
<!--Describe your changes.-->
2024-07-25 12:06:21 +08:00
79a6496bb6
[branch-2.1](function) fix wrong result when convert_tz is out of bound ( #37358 ) ( #38313 )
...
## Proposed changes
pick https://github.com/apache/doris/pull/37358
before:
```sql
mysql> select CONVERT_TZ(cast('0000-01-01 00:00:00.00001' as DATETIMEV1), cast('Asia/Shanghai' as VARCHAR(65533)), cast('America/Los_Angeles' as VARCHAR(65533)));
+---------------------------------------------------------------------------------------------------------------------------------------------------+
| convert_tz(cast('0000-01-01 00:00:00.00001' as DATETIME), cast('Asia/Shanghai' as VARCHAR(65533)), cast('America/Los_Angeles' as VARCHAR(65533))) |
+---------------------------------------------------------------------------------------------------------------------------------------------------+
| q535-12-31 08:01:19 |
+---------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.12 sec)
```
now:
```sql
mysql> select CONVERT_TZ(cast('0000-01-01 00:00:00.00001' as DATETIMEV1), cast('Asia/Shanghai' as VARCHAR(65533)), cast('America/Los_Angeles' as VARCHAR(65533)));
+---------------------------------------------------------------------------------------------------------------------------------------------------+
| convert_tz(cast('0000-01-01 00:00:00.00001' as DATETIME), cast('Asia/Shanghai' as VARCHAR(65533)), cast('America/Los_Angeles' as VARCHAR(65533))) |
+---------------------------------------------------------------------------------------------------------------------------------------------------+
| NULL |
+---------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.09 sec)
```
2024-07-25 11:32:44 +08:00
8de13c5cc8
[fix](function) error scale set in unix_timestamp ( #36110 ) ( #37619 )
...
## Proposed changes
```
mysql [test]>set DEBUG_SKIP_FOLD_CONSTANT = true;
Query OK, 0 rows affected (0.00 sec)
mysql [test]>select cast(unix_timestamp("2024-01-01",'yyyy-MM-dd') as bigint);
+------------------------------------------------------------+
| cast(unix_timestamp('2024-01-01', 'yyyy-MM-dd') as BIGINT) |
+------------------------------------------------------------+
| 1704038400000000 |
+------------------------------------------------------------+
```
now
```
mysql [test]>select cast(unix_timestamp("2024-01-01",'yyyy-MM-dd') as bigint);
+------------------------------------------------------------+
| cast(unix_timestamp('2024-01-01', 'yyyy-MM-dd') as BIGINT) |
+------------------------------------------------------------+
| 1704038400 |
+------------------------------------------------------------+
1 row in set (0.01 sec)
```
The column does not have a scale set, but the cast uses the scale to
perform the cast.
<!--Describe your changes.-->
## Proposed changes
Issue Number: close #xxx
<!--Describe your changes.-->
2024-07-15 10:00:04 +08:00
ca0e44f83f
[fix](case) fix struct format out files ( #37350 ) ( #37499 )
...
bp #37350
2024-07-09 10:11:50 +08:00
ceef9ee123
[feature](serde) support presto compatible output format ( #37039 ) ( #37253 )
...
bp #37039
2024-07-04 13:56:05 +08:00
d237a4d303
[fix](array)fix array_except/union for left const return only one row result #36776 ( #36986 )
2024-06-30 12:25:17 +08:00
cbaff8a700
[fix](nereids)change the decimal's precision and scale for cast(xx as decimal) ( #36540 )
...
pick from master #36316
expression cast( xx as decimal )'s datatype maybe decimalv3 or decimalv2
depending on enable_decimal_conversion value in fe conf file. if
enable_decimal_conversion is true, the datatype is decimalv3(9, 0), but
the datatype was decimalv3(38, 9) in 2.0 releases. So this pr change the
datatype same as 2.0 releases to keep the behavior consistent.
2024-06-20 17:46:11 +08:00
4a117800ca
[Bug](Function) fix json contains with empty value ( #36320 ) ( #36418 )
2024-06-18 10:20:45 +08:00
dd567fa774
[fix](function) support return JsonType for If function ( #35199 )
...
add a FunctionSignature for If to support return Type is JsonType.
2024-05-24 16:23:58 +08:00
eb7eaee386
[fix](function) money format ( #34680 )
2024-05-18 18:35:29 +08:00
ca9eb56233
[Fix](functions) fix strcmp return value #34565
2024-05-12 09:49:38 +08:00
58c19e33b3
[fix](round) Fix incorrect decimal scale inference in round functions ( #34471 )
...
* FIX NEEDED
* FORMAT
* FORMAT
* FIX TEST
2024-05-11 11:42:12 +08:00
e38801968d
[Fix](functions) Fix bug in makedate and str_to_date functions
2024-05-10 22:14:25 +08:00
845732b440
[WIP](test) remove enable_nereids_planner in regression cases (part 3) ( #34558 )
...
previous PR:
part 1: #34417
part 2: #34490
2024-05-10 22:11:01 +08:00
9b712b03b4
[FIX]fix is_ip_address_in_range func with const param ( #34266 )
2024-05-10 14:37:20 +08:00
f7900b53ce
[enhancement](function) floor/ceil/round/round_bankers can use column as scale argument ( #34391 )
2024-05-06 22:18:36 +08:00
20bd0c2987
[FIX](cases )fix ipv6 value for regress case
2024-04-29 13:37:29 +08:00
8d98c71079
[FIX]fix cidr func with const param ( #33968 )
2024-04-24 17:13:50 +08:00
2f60dcf890
[test](hll) fix unstable case without order by clause ( #33947 )
2024-04-24 17:13:50 +08:00
22a6b1d3f5
[feature](function) support hll functions hll_from_base64, hll_to_base64 ( #32089 )
...
Issue Number: #31320
Support two hll functions:
- hll_from_base64
Convert a base64 string(result of function hll_to_base64) into a hll.
- hll_to_base64
Convert an input hll to a base64 string.
2024-04-17 23:42:13 +08:00
bf022f9d8d
[enhancement](function truncate) truncate can use column as scale argument ( #32746 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-04-10 14:53:56 +08:00
1f1932c6b7
[enhancement](nereids)add some date functions for constant fold ( #32772 )
2024-04-10 11:34:30 +08:00
2a0644f442
[Fix](function) Fix unix_timestamp core for string input ( #32871 )
2024-04-09 12:48:35 +08:00
ccd21a6ea4
[Improve](InPredict) enhance in predict with array type ( #31828 )
2024-03-12 14:19:14 +08:00
e91d16854b
[fix](function) fix date_format function execution error on fe ( #31645 )
2024-03-07 16:53:19 +08:00
2d6e975d5a
[fix](cast) fix wrong result while cast string to float ( #31781 )
...
Issue Number: close #31518
2024-03-06 13:07:59 +08:00
7998da4691
[fix](cast) wrong result while cast const to double then to string ( #31657 )
...
Issue Number: close #31514
2024-03-06 13:06:27 +08:00
cca0773261
[feature](function) round function defaults to rounding normally
2024-03-06 13:06:26 +08:00
ff3c7765d6
[Bug](Func) Fix negative number in bitmap return error result ( #31563 )
2024-02-29 12:38:03 +08:00
f163d56a98
[feature](function) support sequence function(alias of array_range), enhance both to handle datetimev2 ( #30823 )
2024-02-27 10:12:19 +08:00
8f77e6363a
[Feature](function) Support xxhash function like murmur hash function ( #31193 )
2024-02-23 19:03:28 +08:00
6cf7468073
[enhancement](function) change some function nullable mode ( #30991 )
...
change some function nullable mode
2024-02-18 14:45:25 +08:00
e68019c10a
[Function](Exec) Support windows function cume_dist ( #30997 )
2024-02-16 10:16:40 +08:00
40e1326bc9
[feature](window-func) support percent_rank window function ( #30926 )
2024-02-16 10:12:25 +08:00
d60ecdba6f
[fix](regex) fix wrong escape of function LIKE ( #30557 )
...
fix wrong escape of function LIKE
2024-02-16 10:12:25 +08:00
8ff8d94697
[fix](ip) change IPv6 to little-endian byte order storage (like IPv4) ( #30730 )
2024-02-05 21:56:57 +08:00
fd2d9ae63e
[improve](test) fix regression test case report error when run times ( #30531 )
2024-02-01 19:01:08 +08:00
7e19224a6c
[fix](function) fix ipv4 funcs get failed error, improve an ipv6 func and exception message ( #30269 )
2024-01-28 18:25:31 +08:00
ca5a314765
[fix](function) make STRLEFT and STRRIGHT and SUBSTR function DEPEND_ON_ARGUMENT ( #28352 )
...
make STRLEFT and STRRIGHT function DEPEND_ON_ARGUMENT
2024-01-25 13:23:59 +08:00
c7360fd014
[feature](function) support ip function named ipv4_cidr_to_range(addr, cidr) ( #29819 )
...
* support ip function ipv4_cidr_to_range
* fix ipv4_cidr_to_range function only support ipv4 type
2024-01-24 10:02:03 +08:00
d5d0e5e611
[feature](function) support ip functions named to_ipv4[or_default, or_null](string) and to_ipv6[or_default, or_null](string) ( #29838 )
2024-01-23 10:09:54 +08:00
dfde10d4c8
[improvement](function) switch inet(6)_aton alias origin function ( #30196 )
2024-01-23 10:09:54 +08:00
ead3b4ac1d
[feature](function) support ip function is_ipv4_compat, is_ipv4_mapped ( #29954 )
2024-01-23 10:07:51 +08:00
97b2a3b993
[improvement](ip function) refactor some ip functions and remove dirty codes ( #30080 )
2024-01-19 15:48:56 +08:00
e894911cda
[function](char) change char function behaviour same with mysql ( #30034 )
...
select char(0) = '\0';
should return true;
2024-01-18 10:04:21 +08:00
66513d57f9
[feature](function) support ip function named ipv6_cidr_to_range(addr, cidr) ( #29812 )
2024-01-16 18:42:09 +08:00
e417128fb9
[bug](bitmap) should return error status when execute failed ( #29841 )
2024-01-16 18:30:23 +08:00
1998735432
[Improvement](function) enable ipv6_num_to_string function to support handling of IPv6 type ( #29886 )
...
Enable ipv6_num_to_string function to handle IPv6 type normally in addition to handling 16 byte string types
2024-01-16 18:30:23 +08:00
e93a16ac6e
[fix](Nereids) support complex literal cast in fe ( #29599 )
2024-01-12 11:59:52 +08:00
9cbb55d49b
[fix](Nereids) create double literal when create decimal literal failed ( #28959 )
...
FIX
1. remove float and double literal toString and getStringValue introduced by
PR #23504 and PR #23271
These functions lead to wrong cast result of double and float literal
2. fix compute signature for datetimev2 always produce scale 6
3. fix stats calculator failed when generate node stats with two same column
4. constant fold on fe failed when cast double to integral
TODO
after fix the first problem, some mv matching not work well, fix them later
- test_dup_mv_div
- test_dup_mv_json
- test_tcu
2024-01-12 11:46:29 +08:00