You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our online sqls, there are many nested functions calls, such as
select a.b.c from test_tbl => select get_struct_field((get_struct_field(a, b),c) from test_tbl
select count(1) from test_tbl where a = 1 and b = 2 and c = 3 => select count(1) from test_tbl where and(and(a = 1, b = 2), c = 3 )
select count(1) from test_tbl where a = 1 or b = 2 or c = 3 => select count(1) from test_tbl where or(or(a = 1, b = 2), c = 3 )
.....
and these functions can be optimized by make the nested arguments collapsed , which means get_struct_field((get_struct_field(a, b),c) => get_struct_field(a, b, c) and(and(a = 1, b = 2), c = 3 ) => and(a =1, b=2, c=3) or(or(a=1, b= 2), c=3) => or(a=1, b=2, c=3)
.....
which can reduce the function calls and improve performance.
The text was updated successfully, but these errors were encountered:
Description
In our online sqls, there are many nested functions calls, such as
select a.b.c from test_tbl
=>select get_struct_field((get_struct_field(a, b),c) from test_tbl
select count(1) from test_tbl where a = 1 and b = 2 and c = 3
=>select count(1) from test_tbl where and(and(a = 1, b = 2), c = 3 )
select count(1) from test_tbl where a = 1 or b = 2 or c = 3
=>select count(1) from test_tbl where or(or(a = 1, b = 2), c = 3 )
.....
and these functions can be optimized by make the nested arguments collapsed , which means
get_struct_field((get_struct_field(a, b),c)
=> get_struct_field(a, b, c)and(and(a = 1, b = 2), c = 3 )
=> and(a =1, b=2, c=3)or(or(a=1, b= 2), c=3)
=> or(a=1, b=2, c=3).....
which can reduce the function calls and improve performance.
The text was updated successfully, but these errors were encountered: