Return reference from TagValueMaybeOwned::value()

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Won't Do
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In a PR, discussion alberto.massari@mongodb.comand mihai.andrei@mongodb.com discovered a pitfall with TagValueMaybeOwned and the small string optimization.

      This ticket is to investigate making that API safe by changing value() to return a reference instead of copy.

      https://github.com/10gen/mongo/blob/3d18b3913db4a52439dd4daba3a1fecf38db28d3/src/mongo/db/exec/sbe/values/value.h#L747

            Assignee:
            Evan Bergeron
            Reporter:
            Ian Boros
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: