sql: improve type determination for column meta
In most cases we don't assign and store type of node of expression AST (except for constant literals). To determine type of node we use sql_expr_type() function, which implements logic of quite simple recursive tree traversal. Before this patch we set type of node after code generation in sqlExprCodeTarget() without any traversal. This approach is way worse even then sql_expr_type(). So, to improve accuracy of type determination, let's always call that method and remove type assignment in sqlExprCodeTarget(). Closes #4126
Showing
- src/box/sql/expr.c 4 additions, 15 deletionssrc/box/sql/expr.c
- src/box/sql/select.c 1 addition, 1 deletionsrc/box/sql/select.c
- test/sql/check-clear-ephemeral.result 1 addition, 1 deletiontest/sql/check-clear-ephemeral.result
- test/sql/gh-2347-max-int-literals.result 1 addition, 1 deletiontest/sql/gh-2347-max-int-literals.result
- test/sql/gh-3199-no-mem-leaks.result 9 additions, 9 deletionstest/sql/gh-3199-no-mem-leaks.result
- test/sql/persistency.result 4 additions, 4 deletionstest/sql/persistency.result
- test/sql/transition.result 2 additions, 2 deletionstest/sql/transition.result
- test/sql/types.result 5 additions, 5 deletionstest/sql/types.result
Loading
Please register or sign in to comment