Tarantool development patches archive
 help / color / mirror / Atom feed
From: Konstantin Osipov <kostja.osipov@gmail.com>
To: Aleksandr Lyapunov <alyapunov@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH] rfc: multi-directional iterators
Date: Sat, 25 Apr 2020 12:03:20 +0300	[thread overview]
Message-ID: <20200425090320.GB8860@atlas> (raw)
In-Reply-To: <5e27bca5-14f4-6800-84c6-53f831cb83b6@tarantool.org>

* Aleksandr Lyapunov <alyapunov@tarantool.org> [20/04/24 13:11]:
> > +may want to select tuples with `a >= 1`, `b >= 1` but `c < 1`. Or, alternatively,
> > +somebody may be willing to get tuples ordered by `a` and `b` in ascending order
> > +but by `c` in descending order: `i:select({}, {iterator = {'GE', 'GE', 'LE'})`.
> Those are not alternatives but independent options. One may wish to select:
> `SELECT * FROM t WHERE a > 1 AND b < 1 ORDER BY a DESC, b ASC`.

I agree. 

> My summary:
> 
> 1. `select({1, 1}, {iterator='GE'})` is not equivalent to `SELECT ..
>    WHERE a>=1 AND b >= 1`.
> 2. It is still possible to implement `iterator={'GE', 'GE'}` that will
>    suitable for that SQL SELECT.
> 3. It is also possible to implement `order={'ASC', 'DESC'}` option in
>    select using the solution #1.

I agree, but it's not urgent either. These queries are rare.

-- 
Konstantin Osipov, Moscow, Russia

  reply	other threads:[~2020-04-25  9:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-24 10:10 Aleksandr Lyapunov
2020-04-25  9:03 ` Konstantin Osipov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-01-26 20:54 Nikita Pettik
2020-01-27 19:34 ` Konstantin Osipov
2020-01-27 19:38   ` Konstantin Osipov
2020-04-25  9:00 ` Konstantin Osipov

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=20200425090320.GB8860@atlas \
    --to=kostja.osipov@gmail.com \
    --cc=alyapunov@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH] rfc: multi-directional iterators' \
    /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