From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id CFC2B4696C3 for ; Sat, 25 Apr 2020 12:03:29 +0300 (MSK) Received: by mail-lj1-f171.google.com with SMTP id u15so12436838ljd.3 for ; Sat, 25 Apr 2020 02:03:29 -0700 (PDT) Date: Sat, 25 Apr 2020 12:03:20 +0300 From: Konstantin Osipov Message-ID: <20200425090320.GB8860@atlas> References: <5e27bca5-14f4-6800-84c6-53f831cb83b6@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5e27bca5-14f4-6800-84c6-53f831cb83b6@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH] rfc: multi-directional iterators List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aleksandr Lyapunov Cc: tarantool-patches@dev.tarantool.org * Aleksandr Lyapunov [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