[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]                                        |
+-----------------------------------------------------+
```
This commit is contained in:
lihangyu
2022-11-07 10:48:16 +08:00
committed by GitHub
parent c7b2b90504
commit 7ffe88b579
11 changed files with 303 additions and 46 deletions

View File

@ -37,6 +37,7 @@ void register_function_array_slice(SimpleFunctionFactory&);
void register_function_array_difference(SimpleFunctionFactory&);
void register_function_array_enumerate(SimpleFunctionFactory&);
void register_function_array_range(SimpleFunctionFactory&);
void register_function_array_popback(SimpleFunctionFactory&);
void register_function_array(SimpleFunctionFactory& factory) {
register_function_array_element(factory);
@ -54,6 +55,7 @@ void register_function_array(SimpleFunctionFactory& factory) {
register_function_array_difference(factory);
register_function_array_enumerate(factory);
register_function_array_range(factory);
register_function_array_popback(factory);
}
} // namespace doris::vectorized