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: Thu, 25 Jun 2020 23:25:27 +0200	[thread overview]
Message-ID: <3e040934-d6dc-200b-5925-04879fea3e83@tarantool.org> (raw)
In-Reply-To: <81127D96-BB22-4F99-A788-047F9327A4AE@tarantool.org>

Hi! Thanks for the fixes!

> diff --git a/test/sql-tap/colname.test.lua b/test/sql-tap/colname.test.lua
> index caa61a07a..b5f04a2d7 100755
> --- a/test/sql-tap/colname.test.lua
> +++ b/test/sql-tap/colname.test.lua
> @@ -635,4 +635,143 @@ test:do_catchsql_test(
> +-- <ORDER BY> use the first column with name "COLUMN_1" from
> +-- column list.
> +test:do_execsql2_test(
> +    "colname-12.16",
> +    [[
> +        SELECT column_1, column_1 COLLATE "unicode_ci" FROM j_1 ORDER BY column_1;
> +    ]], {
> +        "COLUMN_1",1,"COLUMN_1",1

When there is just one row, all the sorting looks the same. So even if
it will work not by first 'column_1', you won't notice. What makes the
test not so useful. Please, make it so it would be clearly visible, that
the sorting really used 'the first column'.

Also it looks innatural that you apply "COLLATE "unicode_ci"" to numbers.
Please, use an expression, which would result into something applicable to
a number and not looking exactly the same.

For example, 'column_1 + 1' or '-column_1'. The latter option would be
especially useful to check how sorting changes, when you select

    SELECT column_1, -column_1 FROM j_1 ORDER BY column_1;

Or

    SELECT -column_1, column_1 FROM j_1 ORDER BY column_1;

If really the first matched column name is used, then the results
should be different.

  reply	other threads:[~2020-06-25 21:25 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 [this message]
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
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=3e040934-d6dc-200b-5925-04879fea3e83@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