asterixdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitry Lychagin <dmitry.lycha...@couchbase.com>
Subject Division operator result when both operands are integers
Date Wed, 02 May 2018 20:38:16 GMT
All,

The recently merged commit for ASTERIXDB-2378 [1] changes the result of the division operator
(/) in some cases.
The / operator now returns a double value if both arguments are integers (previously it returned
an integer value in this case).
This commit also introduces DIV operator that also does division but returns an integer value
if both arguments are integers.

So, before this change we had:
Integer / Integer - > Integer

Now we have:
Integer / Integer -> Double
Integer DIV Integer -> Integer

These two operators are equivalent for all other types of arguments.

Please update your queries if they relied on the old behavior (by changing / to DIV).

[1] https://asterix-gerrit.ics.uci.edu/#/c/2630/

Thanks,
-- Dmitry

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message