[ 
https://issues.apache.org/jira/browse/IMPALA-11612?focusedWorklogId=834035&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-834035
 ]

ASF GitHub Bot logged work on IMPALA-11612:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 16/Dec/22 03:49
            Start Date: 16/Dec/22 03:49
    Worklog Time Spent: 10m 
      Work Description: jbapple closed pull request #35: IMPALA-11612: fix 
ORDER BY expression rewrite bug
URL: https://github.com/apache/impala/pull/35




Issue Time Tracking
-------------------

    Worklog Id:     (was: 834035)
    Time Spent: 40m  (was: 0.5h)

> ORDER BY expression not produced by aggregation output
> ------------------------------------------------------
>
>                 Key: IMPALA-11612
>                 URL: https://issues.apache.org/jira/browse/IMPALA-11612
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Frontend
>    Affects Versions: Impala 4.1.0
>            Reporter: jhkcool
>            Assignee: jhkcool
>            Priority: Major
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Create execute plan failed : org.apache.impala.common.AnalysisException: 
> ORDER BY expression not produced by aggregation output (missing from GROUP BY 
> clause?): (CASE WHEN (to_date(CAST(t1.dt AS TIMESTAMP)) = TIMESTAMP 
> '2022-05-12 00:00:00') THEN '2022-05-12' WHEN (to_date(CAST(t1.dt AS 
> TIMESTAMP)) = TIMESTAMP '2022-05-13 00:00:00') THEN '2022-05-13' END) at 
> org.apache.impala.analysis.SelectStmt$SelectAnalyzer.verifyAggregation(SelectStmt.java:1090)
>  at 
> org.apache.impala.analysis.SelectStmt$SelectAnalyzer.analyze(SelectStmt.java:312)
>  at 
> org.apache.impala.analysis.SelectStmt$SelectAnalyzer.access$100(SelectStmt.java:276)
>  at org.apache.impala.analysis.SelectStmt.analyze(SelectStmt.java:269) at 
> org.apache.impala.analysis.AnalysisContext.reAnalyze(AnalysisContext.java:611)
>  at 
> org.apache.impala.analysis.AnalysisContext.analyze(AnalysisContext.java:585) 
> at 
> org.apache.impala.analysis.AnalysisContext.analyzeAndAuthorize(AnalysisContext.java:468)
>  at 
> org.apache.impala.service.Frontend.doCreateExecRequest(Frontend.java:2084) at 
> org.apache.impala.service.Frontend.getTExecRequest(Frontend.java:1967) at 
> org.apache.impala.service.Frontend.createExecRequest(Frontend.java:1791) at 
> org.apache.impala.service.Frontend$4.run(Frontend.java:2867) at 
> org.apache.impala.service.Frontend$4.run(Frontend.java:2863) at 
> java.security.AccessController.doPrivileged(Native Method) at 
> javax.security.auth.Subject.doAs(Subject.java:360) at 
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1864)
>  at 
> org.apache.impala.service.Frontend.createExecRequestWithProxy(Frontend.java:2863)
>  at 
> org.apache.impala.service.JniFrontend.createExecRequest(JniFrontend.java:208)
> query_option:
> ENABLE_EXPR_REWRITES : true
> while execute query sql:
> {noformat}
> SELECT (CASE WHEN (1 = 1 AND `t1`.`dt` = '2022-05-13') THEN '2022-05-13' END) 
> d0
> FROM `jhk_test`.`p1` `t1`
> GROUP BY (CASE WHEN (1 = 1 AND `t1`.`dt` = '2022-05-13') THEN '2022-05-13' 
> END)
> ORDER BY (CASE WHEN (1 = 1 AND `t1`.`dt` = '2022-05-13') THEN '2022-05-13' 
> END)
> limit 10
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to