[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
This commit is contained in:
lihangyu
2022-11-11 22:08:43 +08:00
committed by GitHub
parent 0ba13af8ff
commit 43490a33a5
12 changed files with 311 additions and 3 deletions

View File

@ -38,6 +38,7 @@ 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_with_constant(SimpleFunctionFactory&);
void register_function_array(SimpleFunctionFactory& factory) {
register_function_array_element(factory);
@ -56,6 +57,7 @@ void register_function_array(SimpleFunctionFactory& factory) {
register_function_array_enumerate(factory);
register_function_array_range(factory);
register_function_array_popback(factory);
register_function_array_with_constant(factory);
}
} // namespace doris::vectorized