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 7C28629676 for ; Tue, 3 Apr 2018 10:54:35 -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 O-DMGJpluEYT for ; Tue, 3 Apr 2018 10:54:35 -0400 (EDT) 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 3C0B429668 for ; Tue, 3 Apr 2018 10:54:35 -0400 (EDT) From: Nikita Pettik Subject: [tarantool-patches] [PATCH 0/3] Rework VIEW processing Date: Tue, 3 Apr 2018 17:54:27 +0300 Message-Id: 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 Branch: https://github.com/tarantool/tarantool/tree/np/gh-3300-parse-load-view Issue: https://github.com/tarantool/tarantool/issues/3300 First patch of the series is about refactoring: as far as VIEWs are always enabled, there is no need in OMIT_VIEW directive. Alongside with this macros, several others are also removed. Second patch adds to space format VIEW column's aliases: 'CREATE VIEW v(a, b) AS SELECT ...' -- in this case, space format will consist from two named fields 'a' and 'b'. Finally, last patch introduces simple lever to fetch SELECT from 'CREATE VIEW AS SELECT ...' statement and load it into internal struct. Also, routine which is connected with views have been refactored, in order to use this facility, instead of relying on struct Table. Alongside with this change, fix codestyle and added doxygen style comments. Nikita Pettik (3): sql: remove usless #ifdef directives sql: add view column aliases to space format sql: load SELECT from 'CREATE VIEW ...' string src/box/sql.c | 22 +- src/box/sql/CMakeLists.txt | 1 - src/box/sql/alter.c | 2 - src/box/sql/attach.c | 6 - src/box/sql/build.c | 231 ++++++++++-------- src/box/sql/complete.c | 333 -------------------------- src/box/sql/delete.c | 20 +- src/box/sql/expr.c | 5 +- src/box/sql/fkey.c | 8 - src/box/sql/insert.c | 17 +- src/box/sql/parse.c | 570 +++++++++++++++++++++++---------------------- src/box/sql/parse.y | 13 +- src/box/sql/pragma.c | 10 +- src/box/sql/pragma.h | 8 - src/box/sql/resolve.c | 3 - src/box/sql/select.c | 180 +++++++------- src/box/sql/sqliteInt.h | 56 ++--- src/box/sql/tarantoolInt.h | 2 +- src/box/sql/tokenize.c | 30 ++- src/box/sql/treeview.c | 2 - src/box/sql/trigger.c | 3 - src/box/sql/update.c | 17 +- src/box/sql/vdbe.c | 5 - src/box/sql/vdbe.h | 2 - src/box/sql/vdbeInt.h | 4 - src/box/sql/vdbeaux.c | 4 - test/sql-tap/view.test.lua | 26 ++- 27 files changed, 593 insertions(+), 987 deletions(-) delete mode 100644 src/box/sql/complete.c -- 2.15.1