Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-2215

HAVING clause without aggregation not applied properly

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      The following query has a "having" clause but it doesn't have a group by. This is invalid syntax and should be rejected.

      select case when 1=1 then "didit" end as c1 from (select 1 as one) a having 1!=1;
      
      Query: select case when 1=1 then "didit" end as c1 from (select 1 as one) a having 1!=1
      
      +-------+
      | c1    |
      +-------+
      | didit |
      +-------+
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            alex.behm Alexander Behm
            alan@cloudera.com Alan Choi
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment