Tarantool development patches archive
 help / color / mirror / Atom feed
From: Nikita Pettik <korablev@tarantool.org>
To: tarantool-patches@freelists.org
Cc: v.shpilevoy@tarantool.org, Nikita Pettik <korablev@tarantool.org>
Subject: [tarantool-patches] [PATCH 0/3] Rework VIEW processing
Date: Tue,  3 Apr 2018 17:54:27 +0300	[thread overview]
Message-ID: <cover.1522763649.git.korablev@tarantool.org> (raw)

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

             reply	other threads:[~2018-04-03 14:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-03 14:54 Nikita Pettik [this message]
2018-04-03 14:54 ` [tarantool-patches] [PATCH 1/3] sql: remove usless #ifdef directives Nikita Pettik
2018-04-03 17:23   ` [tarantool-patches] " Vladislav Shpilevoy
2018-04-03 14:54 ` [tarantool-patches] [PATCH 2/3] sql: add view column aliases to space format Nikita Pettik
2018-04-03 14:54 ` [tarantool-patches] [PATCH 3/3] sql: load SELECT from 'CREATE VIEW ...' string Nikita Pettik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1522763649.git.korablev@tarantool.org \
    --to=korablev@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [tarantool-patches] [PATCH 0/3] Rework VIEW processing' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox