From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 14 Aug 2019 14:00:49 +0300 From: Vladimir Davydov Subject: Re: [PATCH v2 1/8] lua: fix decimal comparison with nil Message-ID: <20190814110049.GD13834@esperanza> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: To: Serge Petrenko Cc: tarantool-patches@freelists.org, kostja@tarantool.org List-ID: On Thu, Aug 08, 2019 at 02:55:52PM +0300, Serge Petrenko wrote: > diff --git a/test/app/decimal.result b/test/app/decimal.result > index b53f4e75d..633f3681a 100644 > --- a/test/app/decimal.result > +++ b/test/app/decimal.result > @@ -223,6 +223,32 @@ b > | - '0.1' > | ... > > +-- check comparsion with nil > +a == nil > + | --- > + | - false > + | ... > +a ~= nil > + | --- > + | - true > + | ... > +a > nil > + | --- > + | - false > + | ... > +a < nil > + | --- > + | - false > + | ... > +a >= nil > + | --- > + | - false > + | ... > +a <= nil > + | --- > + | - false > + | ... == and ~= are fine, but <=, <, >, >= look weird. Besides, they won't work with numbers and strings. So I don't think it's a good idea to introduce this functionality for decimals. Could you please implement comparison with nil only for == and ~= operators?