[Tarantool-patches] [PATCH] rfc: multi-directional iterators
Konstantin Osipov
kostja.osipov at gmail.com
Sat Apr 25 12:03:20 MSK 2020
* Aleksandr Lyapunov <alyapunov at 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
More information about the Tarantool-patches
mailing list