325a1d4b28
[vectorized](function) support array_count function ( #18557 )
...
support array_count function.
array_count:Returns the number of non-zero and non-null elements in the given array.
2023-05-16 17:00:01 +08:00
39ec8aa64c
[refactor](complex-type) refactor array/map/struct literal to not invoke execute() function in prepare state ( #19068 )
2023-05-11 18:44:37 +08:00
834bf2eab7
[feature](array) Add array_last lambda function ( #18388 )
...
Add array_last lambda function
2023-05-11 13:15:54 +08:00
20395ce501
[feature](array_function): add support for array_cum_sum function ( #18231 )
2023-04-27 09:57:13 +08:00
17b59df8dd
[fix](function) Array_map compared offset rows one by one ( #18406 )
...
Array_map 's multi columns compare not only nested data rows to be equal,but also the offsets data must equal each other.
2023-04-25 19:12:19 +08:00
6b351a2818
[vectorzied](function) fix array_map function analyzed failed with order by clause ( #18676 )
...
* [vectorzied](function) fix array_map function analyzed failed with order by clause
* add test
2023-04-18 12:01:44 +08:00
5300b21db7
[Bug](DECIMALV3) report failure if a decimal value is overflow ( #18336 )
2023-04-17 13:18:14 +08:00
1238f6de97
[bug](array) fix be core in array_with_constant/array_repeat function when the first argument is nullable ( #18404 )
...
fix be core in array_with_constant/array_repeat function when the first argument is nullable
2023-04-11 19:46:41 +08:00
0517616242
[vectorized](function) support array_repeat function to be compatible with hive syntax ( #18028 )
...
---------
Co-authored-by: zhangyu209 <zhangyu209@meituan.com >
2023-04-08 15:50:28 +08:00
8b85c55117
[vectorized](function) Support array_shuffle and shuffle function. ( #18116 )
...
---------
Co-authored-by: zhangyu209 <zhangyu209@meituan.com >
2023-04-04 08:53:13 +08:00
94e3472050
[bug](function) fix count equal function return incorrect value ( #18200 )
...
fix count equal function return incorrect value
2023-04-03 11:20:36 +08:00
20b3bdb000
[vectorized](function) support array_first_index function ( #18175 )
...
mysql> select array_first_index(x->x+1>3, [2, 3, 4]);
+-------------------------------------------------------------------+
| array_first_index(array_map([x] -> x(0) + 1 > 3, ARRAY(2, 3, 4))) |
+-------------------------------------------------------------------+
| 2 |
+-------------------------------------------------------------------+
mysql> select array_first_index(x -> x is null, [null, 1, 2]);
+----------------------------------------------------------------------+
| array_first_index(array_map([x] -> x(0) IS NULL, ARRAY(NULL, 1, 2))) |
+----------------------------------------------------------------------+
| 1 |
+----------------------------------------------------------------------+
mysql> select array_first_index(x->power(x,2)>10, [1, 2, 3, 4]);
+---------------------------------------------------------------------------------+
| array_first_index(array_map([x] -> power(x(0), 2.0) > 10.0, ARRAY(1, 2, 3, 4))) |
+---------------------------------------------------------------------------------+
| 4 |
+---------------------------------------------------------------------------------+
2023-03-31 12:51:29 +08:00
1b2aaab2f2
[vectorized](bug) fix some case in enable fold constant ( #17997 )
...
fix some case in enable fold constant
2023-03-31 11:41:31 +08:00
525f15dddf
[vectorized](function) support array_sortby function ( #18071 )
2023-03-30 11:07:49 +08:00
115e52c16c
[Opt](array) optimize_array_sort ( #18123 )
2023-03-27 22:01:24 +08:00
360d3050bc
[Feature](array-function) Support array_reverse_sort function ( #17754 )
...
Co-authored-by: zhangyu209 <zhangyu209@meituan.com >
2023-03-25 21:58:11 +08:00
5445a86570
[Bug](array_product) Fix array_product for ARRAY<DECIMAL> ( #18014 )
2023-03-23 20:29:50 +08:00
089a91ecd5
[vectorized](function) support array_exists lambda function ( #17931 )
...
Co-authored-by: zhangyu209 <zhangyu209@meituan.com >
2023-03-23 11:11:39 +08:00
4193884a32
[feature](array_zip) Support array_zip function ( #17696 )
2023-03-21 18:44:30 +08:00
dc284b62d9
[vectorized](function) support array_filter function ( #17832 )
2023-03-20 23:18:10 +08:00
a53d46e317
[Fix](array function) fix array_pushfront function with DecimalV3 #17760
...
Support array_pushfront function with DecimalV3
Issue Number: close #xxx
2023-03-16 09:03:52 +08:00
85080ee3c3
[vectorized](function) support array_map function ( #17581 )
2023-03-15 10:51:29 +08:00
c302fa2564
[Feature](array-function) Support array_pushfront function ( #17584 )
2023-03-13 14:26:02 +08:00
55c42da511
[Feature](array) Support array<decimalv3> data type ( #16640 )
2023-03-13 10:48:13 +08:00
e1bf9411de
[feature](array function) add support for array_enumerate_uniq ( #17541 )
...
add support for array_enumerate_uniq()
2023-03-10 10:20:49 +08:00
368e6a4f9c
[Bug](array filter) Fix bug due to ColumnArray::filter_generic invalid inplace size_at after set_end_ptr ( #17554 )
...
We should make a new PodArray to add items instead of do it inplace
2023-03-09 10:59:29 +08:00
4ea0d6c5fa
[feature](array_function) add support for array_popfront ( #17416 )
2023-03-08 13:57:38 +08:00
b1d65f855d
[Feature](array-function) Support array_concat function ( #17436 )
2023-03-08 13:57:16 +08:00
06468ba627
[vectorized](bug) fix array constructor function change origin column from block ( #17296 )
2023-03-07 16:42:23 +08:00
526a66e9fb
[Function](array-type) support array_apply ( #17020 )
...
Filter array to match specific binary condition
```
mysql> select array_apply([1000000, 1000001, 1000002], '=', 1000002);
+-------------------------------------------------------------+
| array_apply(ARRAY(1000000, 1000001, 1000002), '=', 1000002) |
+-------------------------------------------------------------+
| [1000002] |
+-------------------------------------------------------------+
```
2023-02-23 17:38:16 +08:00
41947c73eb
[Feature](array-function) Support array functions for nested type datev2 and datetimev2 ( #16382 )
2023-02-08 12:51:07 +08:00
eb7da1c0ee
[fix](datatype) fix some bugs about data type array datetimev2 and decimalv3 ( #16132 )
2023-01-29 14:26:08 +08:00
9ffd109b35
[fix](datetimev2) Fix BE datetimev2 type returning wrong result ( #15885 )
2023-01-20 22:25:20 +08:00
4dbe30d37b
[regression](vectorized) delete vectorized config in regression tests ( #15126 )
2022-12-16 17:08:29 +08:00
7ba4cd764a
[enhancement](array-function) array_position,array_contains,countequal which in FunctionArrayIndex handle target NULL ( #14564 )
...
in the previous, the result is:
```
mysql> select array_position([1, null], null);
+--------------------------------------+
| array_position(ARRAY(1, NULL), NULL) |
+--------------------------------------+
| NULL |
+--------------------------------------+
1 row in set (0.02 sec)
```
but after this commit, the result become:
```
mysql> select array_position([1, null], null);
+--------------------------------------+
| array_position(ARRAY(1, NULL), NULL) |
+--------------------------------------+
| 2 |
+--------------------------------------+
1 row in set (0.02 sec)
```
2022-11-25 14:19:50 +08:00
bc699511d0
[Fix](array-function) fix array_distinct null values ( #14544 )
...
in the previous the result is:
```
mysql> select array_distinct([1,1,3,3,null, null, null]);
+-----------------------------------------------------+
| array_distinct(ARRAY(1, 1, 3, 3, NULL, NULL, NULL)) |
+-----------------------------------------------------+
| [1, 3, NULL, NULL, NULL] |
+-----------------------------------------------------+
1 row in set (0.00 sec)
```
after this fix, the result becomes:
```
mysql> select array_distinct([1,1,3,3,null, null, null]);
+-----------------------------------------------------+
| array_distinct(ARRAY(1, 1, 3, 3, NULL, NULL, NULL)) |
+-----------------------------------------------------+
| [1, 3, NULL] |
+-----------------------------------------------------+
1 row in set (0.00 sec)
```
2022-11-24 19:07:28 +08:00
16d8a1853a
[Bug](array-function) array set function not handle all null value ( #14318 )
2022-11-22 09:07:43 +08:00
b4aef889f2
[feature-array](array-function) add array constructor function array() ( #14250 )
...
* [feature-array](array-function) add array constructor function `array()`
```
mysql> select array(qid, creationDate) from nested_c_2 limit 10;
+------------------------------+
| array(`qid`, `creationDate`) |
+------------------------------+
| [1000038, 20090616074056] |
| [1000069, 20090616075005] |
| [1000130, 20090616080918] |
| [1000145, 20090616081545] |
+------------------------------+
10 rows in set (0.01 sec)
```
2022-11-19 10:49:50 +08:00
f86886f8f5
[Feature](function) Support array_compact function ( #14141 )
2022-11-15 14:24:37 +08:00
93e5d8e660
[Vectorized](function) support bitmap_from_array function ( #14259 )
2022-11-15 01:55:51 +08:00
43490a33a5
[feature-array](array-type) Add array function array_with_constant ( #14115 )
...
Return array of constants with length num.
```
mysql> select array_with_constant(4, 1223);
+------------------------------+
| array_with_constant(4, 1223) |
+------------------------------+
| [1223, 1223, 1223, 1223] |
+------------------------------+
1 row in set (0.01 sec)
```
co-authored-by @eldenmoon
2022-11-11 22:08:43 +08:00
2e29b15c6a
[test](array function)add array_range function test ( #14123 )
...
* add array_range function test
* add array_range function test
2022-11-11 18:04:33 +08:00
7ffe88b579
[feature-array](array-type) Add array function array_popback ( #13641 )
...
Remove the last element from array.
```
mysql> select array_popback(['test', NULL, 'value']);
+-----------------------------------------------------+
| array_popback(ARRAY('test', NULL, 'value')) |
+-----------------------------------------------------+
| [test, NULL] |
+-----------------------------------------------------+
```
2022-11-07 10:48:16 +08:00
d183199319
[Bug](array-type) Fix array product calculate decimal type return wrong result ( #13794 )
2022-11-03 17:26:34 +08:00
738da0b139
[bugfix](join) inner join return wrong result ( #13608 )
...
* bug fix for vhash join
* add regression test
Co-authored-by: cambyzju <zhuxiaoli01@baidu.com >
2022-10-27 11:48:41 +08:00
235c105554
[feature-array](array-type) Add array function array_enumerate ( #13612 )
...
Add array function array_enumerate
2022-10-25 15:12:11 +08:00
177e82bdab
[Enhancement](array-type) Add type derivation for array functions ( #13534 )
...
From now, we don't support type derivation for array function's arguments.
So that the cases below will return wrong values or even cause be core.
mysql> select array_union([1],[10000000]);
+----------------------------------------+
| array_union(ARRAY(1), ARRAY(10000000)) |
+----------------------------------------+
| [1, -128] |
+----------------------------------------+
1 row in set (0.03 sec)
mysql> select array_union([NULL],[1]);
ERROR 1105 (HY000): RpcException, msg: io.grpc.StatusRuntimeException: UNAVAILABLE: Network closed for unknown reason
mysql> select array_union([],[1]);
ERROR 1105 (HY000): RpcException, msg: io.grpc.StatusRuntimeException: UNAVAILABLE: Network closed for unknown reason
This commit make a small fix to derivate the argument types of the array function
1、 For null type in arguments, cast the null type to boolean type, because null type should not be seen in be.
2、For different types in arguments, cast all arguments type to their compatible type.
2022-10-24 11:51:47 +08:00
a555f45834
[fix](array-type) fix the wrong result of array_join function ( #13477 )
...
this pr is used to fix the wrong result of array_join function.
before the change, the array_join function will return wrong result.
MySQL [example_db]> select array_join(["", "1", "2"], '');
+--------------------------------------+
| array_join(ARRAY('', '1', '2'), '') |
+--------------------------------------+
| 1_2 |
+--------------------------------------+
3.after the change, the array_join function will return correct result.
MySQL [example_db]> select array_join(["", "1", "2"], '');
+--------------------------------------+
| array_join(ARRAY('', '1', '2'), '') |
+--------------------------------------+
| _1_2 |
+--------------------------------------+
Issue Number: #7570
2022-10-21 17:36:44 +08:00
3ca8bfaf30
[Function](array) support array_difference function ( #13440 )
2022-10-21 10:57:37 +08:00
32b1456b28
[feature-wip](array) remove array config and check array nested depth ( #13428 )
...
1. remove FE config `enable_array_type`
2. limit the nested depth of array in FE side.
3. Fix bug that when loading array from parquet, the decimal type is treated as bigint
4. Fix loading array from csv(vec-engine), handle null and "null"
5. Change the csv array loading behavior, if the array string format is invalid in csv, it will be converted to null.
6. Remove `check_array_format()`, because it's logic is wrong and meaningless
7. Add stream load csv test cases and more parquet broker load tests
2022-10-20 15:52:31 +08:00