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 9272724D30 for ; Thu, 24 May 2018 03:33:16 -0400 (EDT) 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 2t9HoUNHQKaZ for ; Thu, 24 May 2018 03:33:16 -0400 (EDT) Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (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 461EC24D2F for ; Thu, 24 May 2018 03:33:15 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v7 6/7] sql: export funcs defined on Expr, ExprList to sql.h References: <26d7bf8070e9e573eb61897c34bf027a52eb8d66.1527084287.git.kshcherbatov@tarantool.org> <20180523181528.GH4266@atlas> From: Kirill Shcherbatov Message-ID: <530d8e91-dea0-7248-fb7e-3c1f25eb942a@tarantool.org> Date: Thu, 24 May 2018 10:33:13 +0300 MIME-Version: 1.0 In-Reply-To: <20180523181528.GH4266@atlas> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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, Konstantin Osipov Cc: v.shpilevoy@tarantool.org > Why do we need to use low-level parser calls in the server?This functions are required to work with ExprList structure in next commit, to duplicate ExprList with checks in space_def_new, space_def_dup; to delete them in space_opts_destroy and on checks_array_decode failure; finally, to grow checks list width on checks_array_decode iteration. I did not want to mix cosmetic and functional changes in one patch. > I don't understand why we need to use internal parser API calls in > the server. It seems all the server should need to know is how to > invoke the parser with a string fragment, and how to convert the > resulting AST to vdbe, and then how to execute the vdbe/free the > resources. > > Perhaps there should be a method to reset the vdbe for subsequent > execution. They do not generate Vdbe instructions, it's a service instruments like sql_expr_delete that already declared in sql.h this way.