Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-18666

Sql. Subqueries with invalid aggregates in subqueries are not rejected

    XMLWordPrintableJSON

Details

    • Docs Required, Release Notes Required

    Description

      The following queries are expected to fail but they return some results:

      # this will fail, because "i" is not an aggregate but the SUM(i1.i) turns this query into an aggregate
      skipif ignite3
      statement error
      SELECT i, (SELECT SUM(i1.i)) FROM integers i1;
      
      # PG: ERROR:  column "i1.i" must appear in the GROUP BY clause or be used in an aggregate function
      skipif ignite3
      statement error
      SELECT i+1, (SELECT SUM(i1.i)) FROM integers i1;
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            mzhuravkov Maksim Zhuravkov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: