Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-29245

[CX] Align division with Query Service

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Done
    • 6.0.0
    • 6.5.0
    • analytics
    • CX Sprint 161, CX Sprint 162, CX Sprint 163, CX Sprint 164, CX Sprint 165, CX Sprint 166

    Description

      IDIV operator is supported by the grammar, but there's no runtime for it. We need to implement it.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            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 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.
            till 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).

            till 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 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

            Re-triage issues for the next release.

            till Till Westmann added a comment - Re-triage issues for the next release.

            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 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.

            Till Westmann since there is no code change, can we just close this issue?

            mihir.kamdar Mihir Kamdar (Inactive) added a comment - Till Westmann since there is no code change, can we just close this issue?

            Yes, closed.

            till Till Westmann added a comment - Yes, closed.

            People

              till Till Westmann
              dmitry.lychagin Dmitry Lychagin (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty