This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch dev-1.1.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/dev-1.1.1 by this push:
new a3155b1965 [cherry-pick 1.1.1](bug) string pad functions should always
be nullable (#11139)
a3155b1965 is described below
commit a3155b19653c5ec80b387cefe1ebdb3e6fab0fa1
Author: starocean999 <[email protected]>
AuthorDate: Sat Jul 23 00:00:04 2022 +0800
[cherry-pick 1.1.1](bug) string pad functions should always be nullable
(#11139)
---
be/src/vec/functions/function_string.h | 2 +-
gensrc/script/doris_builtins_functions.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/be/src/vec/functions/function_string.h
b/be/src/vec/functions/function_string.h
index cc540084f3..692fa3fe86 100644
--- a/be/src/vec/functions/function_string.h
+++ b/be/src/vec/functions/function_string.h
@@ -661,7 +661,7 @@ public:
size_t get_number_of_arguments() const override { return 3; }
DataTypePtr get_return_type_impl(const DataTypes& arguments) const
override {
- return std::make_shared<DataTypeString>();
+ return make_nullable(std::make_shared<DataTypeString>());
}
bool use_default_implementation_for_nulls() const override { return true; }
bool use_default_implementation_for_constants() const override { return
true; }
diff --git a/gensrc/script/doris_builtins_functions.py
b/gensrc/script/doris_builtins_functions.py
index 4655856624..0a3d138b63 100755
--- a/gensrc/script/doris_builtins_functions.py
+++ b/gensrc/script/doris_builtins_functions.py
@@ -854,10 +854,10 @@ visible_functions = [
'15FunctionContextERKNS1_9StringValERKNS1_6IntValE', '', '', 'vec',
''],
[['lpad'], 'VARCHAR', ['VARCHAR', 'INT', 'VARCHAR'],
'_ZN5doris15StringFunctions4lpadEPN9doris_udf'
- '15FunctionContextERKNS1_9StringValERKNS1_6IntValES6_', '', '',
'vec', ''],
+ '15FunctionContextERKNS1_9StringValERKNS1_6IntValES6_', '', '',
'vec', 'ALWAYS_NULLABLE'],
[['rpad'], 'VARCHAR', ['VARCHAR', 'INT', 'VARCHAR'],
'_ZN5doris15StringFunctions4rpadEPN9doris_udf'
- '15FunctionContextERKNS1_9StringValERKNS1_6IntValES6_', '', '',
'vec', ''],
+ '15FunctionContextERKNS1_9StringValERKNS1_6IntValES6_', '', '',
'vec', 'ALWAYS_NULLABLE'],
[['append_trailing_char_if_absent'], 'VARCHAR', ['VARCHAR', 'VARCHAR'],
'_ZN5doris15StringFunctions30append_trailing_char_if_absentEPN9doris_udf15FunctionContextERKNS1_9StringValES6_',
'', '', 'vec', 'ALWAYS_NULLABLE'],
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]