Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Roman Khabibov <roman.habibov@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v3 1/2] sql: use unify pattern for column names
Date: Tue, 30 Jun 2020 23:23:18 +0200	[thread overview]
Message-ID: <54353233-4232-5964-414d-2115f18b2ac1@tarantool.org> (raw)
In-Reply-To: <0B6AD22C-DC0E-441C-B84E-9667A0AED2C3@tarantool.org>

Hi! Thanks for the fixes!

> +test:do_execsql2_test(
> +    "colname-12.5",
> +    [[
> +        CREATE TABLE j (s1 SCALAR PRIMARY KEY);
> +        INSERT INTO j VALUES(1);
> +    ]], {})
> +
> +--
> +-- Column named as 'COLUMN_1', because 's1 + 1' is a expression.
> +--
> +test:do_execsql2_test(
> +    "colname-12.6",
> +    [[
> +        SELECT s1 + 1 FROM j;
> +    ]], {
> +        "COLUMN_1",2
> +    })
> +
> +test:do_execsql2_test(
> +    "colname-12.7",
> +    [[
> +        SELECT s1 + 1 FROM j ORDER BY column_1;
> +    ]], {
> +        "COLUMN_1",2
> +    })
> +
> +test:do_execsql2_test(
> +    "colname-12.8",
> +    [[
> +        SELECT * FROM (SELECT s1 + 1 FROM j
> +                       ORDER BY column_1) ORDER BY column_1;
> +    ]], {
> +        "COLUMN_1",2
> +    })
> +
> +test:do_execsql2_test(
> +    "colname-12.9",
> +    [[
> +        SELECT s1 + 1 FROM j GROUP BY column_1;
> +    ]], {
> +        "COLUMN_1",2
> +    })
> +
> +test:do_execsql2_test(
> +    "colname-12.10",
> +    [[
> +        SELECT * FROM (SELECT s1 + 1 FROM j
> +                       ORDER BY column_1) GROUP BY column_1;
> +    ]], {
> +        "COLUMN_1",2
> +    })
> +
> +test:do_execsql2_test(
> +    "colname-12.11",
> +    [[
> +        SELECT * FROM (SELECT s1 + 1 FROM j
> +                       ORDER BY column_1) WHERE column_1 = 2;
> +    ]], {
> +        "COLUMN_1",2
> +    })
> +
> +test:do_execsql2_test(
> +    "colname-12.12",
> +    [[
> +        SELECT *, s1 + 1 FROM j ORDER BY column_1;
> +    ]], {
> +        "S1",1,"COLUMN_1",2
> +    })
> +
> +test:do_execsql2_test(
> +    "colname-12.13",
> +    [[
> +        SELECT s1 + 1, * FROM j ORDER BY column_1;
> +    ]], {
> +        "COLUMN_1",2,"S1",1
> +    })
> +
> +test:do_execsql2_test(
> +    "colname-12.14",
> +    [[
> +        CREATE TABLE j_1 (column_1 SCALAR PRIMARY KEY, column_2 SCALAR);
> +        INSERT INTO j_1 VALUES(1, 1);
> +    ]], {})
> +
> +test:do_execsql2_test(
> +    "colname-12.15",
> +    [[
> +        SELECT column_1, column_1 + 1, column_2, 2 FROM j_1;
> +    ]], {
> +        "COLUMN_1",1,"COLUMN_1",2,"COLUMN_2",1,"COLUMN_2",2
> +    })
> +

Is there a test on how ORDER BY selects a column?

  reply	other threads:[~2020-06-30 21:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11 15:18 [Tarantool-patches] [PATCH v3 0/2] Use-unify-pattern-for-column-names Roman Khabibov
2020-06-11 15:18 ` [Tarantool-patches] [PATCH v3 1/2] sql: use unify pattern for column names Roman Khabibov
2020-06-15 21:59   ` Vladislav Shpilevoy
2020-06-22 21:14     ` roman
2020-06-23 23:12       ` Vladislav Shpilevoy
2020-06-25 14:35         ` Roman Khabibov
2020-06-25 21:25           ` Vladislav Shpilevoy
2020-06-27 11:50             ` Roman Khabibov
2020-06-29 20:08               ` Vladislav Shpilevoy
2020-06-29 23:46                 ` Roman Khabibov
2020-06-30 21:23                   ` Vladislav Shpilevoy [this message]
2020-07-01 12:45                     ` Roman Khabibov
2020-07-01 21:25                       ` Vladislav Shpilevoy
2020-07-02 15:55                         ` Roman Khabibov
2020-06-11 15:18 ` [Tarantool-patches] [PATCH v3 2/2] sql: print span more properly Roman Khabibov
2020-06-15 22:18   ` Vladislav Shpilevoy
2020-06-22 21:14     ` roman
2020-06-23 23:12       ` Vladislav Shpilevoy
2020-07-02 15:55         ` Roman Khabibov
2020-07-02 19:06           ` 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=54353233-4232-5964-414d-2115f18b2ac1@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=roman.habibov@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v3 1/2] sql: use unify pattern for column names' \
    /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