Paul Rogers created IMPALA-7785:
-----------------------------------

             Summary: Analyzer cannot handle GROUP BY clause rewrites
                 Key: IMPALA-7785
                 URL: https://issues.apache.org/jira/browse/IMPALA-7785
             Project: IMPALA
          Issue Type: Bug
          Components: Frontend
    Affects Versions: Impala 3.0
            Reporter: Paul Rogers


The FE analyzer has a stage that rewrites expressions to make them simpler. The 
analyzer also has a stage that matches up {{GROUP BY}} expressions with 
{{SELECT}} clause expressions. Apparently, the two don't work together:

{code:sql}
SELECT coalesce(string_col, 'foo')                                    
FROM functional.alltypes                                                  
GROUP BY coalesce(string_col, 'foo')                                         
{code}

The above is rewritten using the new conditional function rewrite rules. Result:

{noformat}
org.apache.impala.common.AnalysisException:
  select list expression not produced by aggregation output
  (missing from GROUP BY clause?):
  CASE WHEN string_col IS NOT NULL THEN string_col ELSE 'foo' END
{noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org

Reply via email to