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

[CX] object-concat() should issue a warning on duplicate fields

    XMLWordPrintable

Details

    • Untriaged
    • 1
    • Unknown
    • CX Sprint 286

    Description

      When object-concat is applied on multiple objects with different keys, e.g.

      select value object_concat({"a":"b"}, {"b":"c"});
      

      the objects are concatenated as expected

      [
        {
          "b": "c",
          "a": "b"
        }
      ]

      But when object-concat is applied on multiple that share the same key, the value of a concatenated object is overwritten, i.e.

      select value object_concat({"a":"b"}, {"a":"c"});
      

      yields

      [
        {
          "a": "c"
        }
      ]

      which can lead to confusing behavior, if the query author is not aware of this behavior.

      We should issue a warning to alert the query author.

      Attachments

        Issue Links

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

          Activity

            People

              umang.agrawal Umang
              ali.alsuliman Ali Alsuliman
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty