Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-63840

mqlrun yields inconsistent with mongod when field name is empty

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Query Execution
    • ALL
    • Hide

      $ ./mqlrun -j -e '[]' empty_field_names.bson # this bson file is attached

      { a: 1 }

      { : 1 }
      { : 2 }

      $ ./mqlrun -j -e '[{$match: {"":1}}]' empty_field_names.bson # no results

       

      $ ./mqlrun -j -e '[{$match: {"a":1}}]' empty_field_names.bson

      { a: 1 }
      Show
      $ ./mqlrun -j -e '[]' empty_field_names.bson # this bson file is attached { a: 1 } { : 1 } { : 2 } $ ./mqlrun -j -e '[{$match: {"":1 }}]' empty_field_names.bson # no results   $ ./mqlrun -j -e '[{$match: {"a":1 }}]' empty_field_names.bson { a: 1 }

    Description

      The empty string ("") is a valid field name in MongoDB and a user can query off of it using a match pipeline stage when running on a mongod. However, if a document is passed to mqlrun with the empty string as a field name, then that field is effectively ignored, rather than queried off of.

      This was discovered while investigating a fix for MHOUSE-3552.

      Attachments

        Activity

          People

            backlog-query-execution Backlog - Query Execution
            shakil.rafi@mongodb.com Shakil Rafi
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: