From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 1C0EE25CB5 for ; Thu, 17 Jan 2019 08:33:26 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WDYmI4B-GwJz for ; Thu, 17 Jan 2019 08:33:26 -0500 (EST) Received: from smtp41.i.mail.ru (smtp41.i.mail.ru [94.100.177.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id CEBC925C42 for ; Thu, 17 Jan 2019 08:33:25 -0500 (EST) Date: Thu, 17 Jan 2019 16:33:22 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH 2/2] sql: compute resulting collation for concatenation Message-ID: <20190117133322.GO28204@chai> References: <652a9e6a4514a03ef93133961b09c2f5d45721d8.1547644180.git.korablev@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <652a9e6a4514a03ef93133961b09c2f5d45721d8.1547644180.git.korablev@tarantool.org> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org Cc: v.shpilevoy@tarantool.org, Nikita Pettik * Nikita Pettik [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