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

Remove support for $sql in Agg. Builder

    • Not Needed
    • Iteration Quince

      It turns out $sql is not a stage that can be used in an aggregation that is executed on a collection.

      Essentially, it is not used like this:

      db.listingsAndReviews.aggregate([{
        $sql: {
          statement: 'select * from listingsAndReviews limit 2',
          format: 'jdbc',
          dialect: 'mysql'
        }
      }]);
      

      it is used like this:

      db.adminCommand({
        aggregate: 1,
        pipeline: [
          $sql: {
            statement: 'select * from listingsAndReviews limit 2',
            format: 'jdbc',
            dialect: 'mysql'
          }
        ]
      });
      

      additionally, in terms of use cases, $sql is built to support JDBC connections rather than as a user-facing stage. Therefore, it should be removed.

            Assignee:
            rhys.howell@mongodb.com Rhys Howell
            Reporter:
            massimiliano.marcon@mongodb.com Massimiliano Marcon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: