$setUnion returns values from second array instead of union

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Works as Designed
    • Priority: Major - P3
    • None
    • Affects Version/s: 3.2.3
    • Component/s: Querying
    • None
    • ALL
    • Hide

      execute script
      { $setUnion: { [ "a", "b", "c" ], [ "b", "a", "a", "d" ] }}
      or

      { $setUnion: [ "a", "b", "c" ], [ "b", "a", "a", "d" ] }
      Show
      execute script { $setUnion: { [ "a", "b", "c" ], [ "b", "a", "a", "d" ] }} or { $setUnion: [ "a", "b", "c" ], [ "b", "a", "a", "d" ] }
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When execute
      { $setUnion: { [ "a", "b", "c" ], [ "b", "a", "a", "d" ] }}
      or

      { $setUnion: [ "a", "b", "c" ], [ "b", "a", "a", "d" ] }

      either returns: "b", "a", "a", "d"

      1. union does not work. expected result for union should include: "c", "b", "a", "d"
      2. duplicated items do not removed from the result.

            Assignee:
            Mark Agarunov (Inactive)
            Reporter:
            anatolii petruchok
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: