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

Runtime error where warning needed for heterogeneous field/arrays

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • Morpheus
    • Morpheus, 7.0.3
    • analytics
    • Macbook Pro w/OSX (but it doesn't matter)
    • Untriaged
    • 1
    • Unknown

    Description

      We need to handle queries better where there is an array-valued field that also has a non-array value.  (E.g., a list of strings or an atomic string, e.g., the empty string being abused to represent missing data.)  We return a runtime error in this case if you do an existential condition on the array - we should probably warn instead. 

      Ex:

      WITH MixedData AS ([{"id":1,"words":["plural", "list"]}, {"id":2, "words":"singular"}])
      SELECT VALUE m FROM MixedData m
      WHERE (SOME w IN m.words SATISFIES w = "list" END);

      This query works happily in N1QL for Query but gets a runtime type error in N1QL for Analytics.  In the latter case it should probably warn and return the same result as the Query service!  This is annoying for users of both (or even just users of Analytics).

      Attachments

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

        Activity

          People

            ali.alsuliman Ali Alsuliman
            mike.carey Mike Carey
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty