Maybe we can remove it from the grammar? I think that the plan was to use "/" for division with fractional results and "DIV" for integer division.
Till Westmann
added a comment - Maybe we can remove it from the grammar? I think that the plan was to use "/" for division with fractional results and "DIV" for integer division.
MB-27565 proposes to add DIV and MOD operators with DIV being an integer division.
So we don't need an IDIV operator - it needs to be removed from the grammar.
Also the current "/" operator provides an integer division - we should change it to return a fractional result (like in the Query Service).
Till Westmann
added a comment - - edited MB-27565 proposes to add DIV and MOD operators with DIV being an integer division.
So we don't need an IDIV operator - it needs to be removed from the grammar.
Also the current "/" operator provides an integer division - we should change it to return a fractional result (like in the Query Service).
CBAS "/" operator is aligned with the Query Service's "/" operator.
Query service does not have DIV, IDIV operators but has DIV() and IDIV() functions (and ADD(), IMOD(), MOD(), MULT(), NEG(), SUB()) Should CBAS also implement those?
See https://github.com/couchbase/query/tree/master/expression
Dmitry Lychagin (Inactive)
added a comment - - edited CBAS "/" operator is aligned with the Query Service's "/" operator.
Query service does not have DIV, IDIV operators but has DIV() and IDIV() functions (and ADD(), IMOD(), MOD(), MULT(), NEG(), SUB()) Should CBAS also implement those?
See https://github.com/couchbase/query/tree/master/expression
DIV(), IDIV(), ADD(), IMOD(), MOD(), MULT(), NEG(), and SUB() are internal function that are not exposed to the user, so no further alignment is necessary.
Till Westmann
added a comment - DIV(), IDIV(), ADD(), IMOD(), MOD(), MULT(), NEG(), and SUB() are internal function that are not exposed to the user, so no further alignment is necessary.
Maybe we can remove it from the grammar? I think that the plan was to use "/" for division with fractional results and "DIV" for integer division.