This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 7948c8ede2 [bug](function) Fix bug in the process of generating 
template functions #17676
7948c8ede2 is described below

commit 7948c8ede2e7d9da67c64b70dfec18bcb9fa3be2
Author: xy720 <[email protected]>
AuthorDate: Mon Mar 13 07:29:32 2023 +0800

    [bug](function) Fix bug in the process of generating template functions 
#17676
    
    If users compile fe with python version <= 2.6
    
    They will meet a compile error in gen_builtins_functions.py with following 
msg:
---
 gensrc/script/gen_builtins_functions.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gensrc/script/gen_builtins_functions.py 
b/gensrc/script/gen_builtins_functions.py
index 2aa6c74fcd..c80066bd62 100755
--- a/gensrc/script/gen_builtins_functions.py
+++ b/gensrc/script/gen_builtins_functions.py
@@ -116,7 +116,7 @@ def generate_fe_datatype(str_type, template_types):
 
     # process template
     if str_type in template_types:
-        return 'new TemplateType("{}")'.format(str_type)
+        return 'new TemplateType("{0}")'.format(str_type)
 
     # process Array, Map, Struct template
     template_start = str_type.find('<')
@@ -125,10 +125,10 @@ def generate_fe_datatype(str_type, template_types):
         # exclude <>
         template = str_type[template_start + 1 : template_end]
         if str_type.startswith("ARRAY<"):
-            return 'new ArrayType({})'.format(generate_fe_datatype(template, 
template_types))
+            return 'new ArrayType({0})'.format(generate_fe_datatype(template, 
template_types))
         elif str_type.startswith("MAP<"):
             types = template.split(',', 2)
-            return 'new MapType({}, {})'.format(generate_fe_datatype(types[0], 
template_types), generate_fe_datatype(types[1], template_types))
+            return 'new MapType({0}, 
{1})'.format(generate_fe_datatype(types[0], template_types), 
generate_fe_datatype(types[1], template_types))
 
     # lagacy Array, Map syntax
     if str_type.startswith("ARRAY_"):


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to