Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-4887

Aggregation pipeline parsing when importing from text breaks depending on spaces/indentation

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor - P4 Minor - P4
    • 1.34.0
    • None
    • Aggregation pipeline
    • None
    • 3
    • Not Needed
    • Iteration Narwhal

    Description

      It seems that at least in $group stages, the wrong indentations create issues to the parser.

      A quick investigation showed that acorn returns different output depending on the indentation. We are using acorn-loose, which in their README says:

      It will, to recover from missing brackets, treat whitespace as significant, which has the downside that it might mis-parse a valid but weirdly indented file. It is recommended to always try a parse with the regular acorn parser first, and only fall back to this parser when that one finds syntax errors.

      We should probably do that.

      Attachments

        Activity

          People

            Unassigned Unassigned
            massimiliano.marcon@mongodb.com Massimiliano Marcon
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: