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

[CQF] ASSERT_AUTO_* macro edits appear on wrong line when run with an empty string

    • Query Optimization
    • Fully Compatible
    • 153

      A very common workflow is to introduce a new unit test with an empty string and an ASSERT_AUTO_* macro. Then compile and run the unittest with --autoUpdateAsserts to fill in the explain output and manually verify the result. This workflow appears to generate code on the wrong line, causing the build to fail.

      Steps to reproduce:
      auto node = ...;
      ASSERT_EXPLAIN_V2_AUTO("", node);
      Run unit test with --autoUpdateAsserts

      The generated explain ends up on the wrong line:
      "Root [

      {root}]\n"
      "Union [{root}

      ]\n"
      ...
      "PhysicalScan []\n"
      ASSERT_EXPLAIN_V2_AUTO("", node);

      rather than

      ASSERT_EXPLAIN_V2_AUTO("Root []", node);

            Assignee:
            milena.ivanova@mongodb.com Milena Ivanova
            Reporter:
            ben.shteinfeld@mongodb.com Ben Shteinfeld
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: