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

Sql. Incorrect validation for query contains aggregates by outer query

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • sql

    Description

      Sql engine consider incorrect queries which have aggregate function for outer query in WHERE  clause. For example few queries in sql/subquery/any_all/test_correlated_any_all.test are fails:

      SELECT (SELECT SUM(i)+SUM(i1.i) FROM integers)>ANY(SELECT i FROM integers WHERE i>MIN(i1.i)) FROM integers i1;
      
      SELECT SUM(i)>ANY(SELECT i FROM integers WHERE i>MIN(i1.i)) FROM integers i1;
      
      SELECT MIN(i)>ANY(SELECT i FROM integers WHERE i>MIN(i1.i)) FROM integers i1;

      Validation error looks as

       Aggregate expression is illegal in WHERE clause

      Attachments

        Activity

          People

            Unassigned Unassigned
            jooger Iurii Gerzhedovich
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: