[tarantool-patches] Re: [PATCH 2/2] sql: compute resulting collation for concatenation
Konstantin Osipov
kostja at tarantool.org
Thu Jan 17 16:33:22 MSK 2019
* Nikita Pettik <korablev at tarantool.org> [19/01/16 17:06]:
> According to ANSI, result of concatenation operation should derive
> collation sequence from its operands. Now it is not true: result is
> always comes with no ("none") collation.
Generally, it should be very cheap to introduce expression static
analysis phase by adding static analysis state to struct Expr.
Yes, it's a blasphemy from separation of concerns point of view
but it seems to be a lesser evil than invoking partial static
analysis here and there during code generation.
What i mean is that instead of changing signature of
sql_expr_coll() one should be able to do:
/**
* Fills expr->coll for every node in the expression tree or
* returns an appropriate error if there is a type error.
*/
int
sql_expr_static_analysis(struct Expr *expr);
--
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov
More information about the Tarantool-patches
mailing list