Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-1161

mongosh eval errors with data lake explain verbosities

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: Embedded Shell
    • Labels:
      None
    • Not Needed

      Problem Statement/Rationale

      Data Lake explain outputs can be very long so it can be useful to pipe this to a file using `>` and the mongosh --eval option such as

      mongosh "mongodb://datalaketest/myFirstDatabase" --tls --authenticationDatabase admin --username john --password samplepass --eval "db.orders.find().explain("queryPlannerExtended")" > explainOut.txt

      This errors out with the following error

      queryPlannerExtended is not defined

      Steps to Reproduce

      Attempt to run explain plan in an --eval while connecting to data lake using a data lake verbosity

      Expected Results

      Query to execute successfully

      Actual Results

      Query throws a reference error

      Additional Notes

      If you eval the normal explain verbosity against the ADL, the ADL throws the error.
      If you eval the ADL verbosity against a mongod it throws a not valid value error. Eval probably doesnt need to do this check since mongod and ADL both error when given the wrong verbosities 

            Assignee:
            rhys.howell@mongodb.com Rhys Howell
            Reporter:
            john.meagher@mongodb.com John Meagher
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: