[ 
https://issues.apache.org/jira/browse/IMPALA-7250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16534274#comment-16534274
 ] 

Tim Armstrong commented on IMPALA-7250:
---------------------------------------

We should be using the same version of "now()" everywhere in the query - 
there's logic to pick "now()" upfront then reuse it everywhere. I'm guessing 
this is breaking down somehow.

> AnalysisException in select datediff() with group by
> ----------------------------------------------------
>
>                 Key: IMPALA-7250
>                 URL: https://issues.apache.org/jira/browse/IMPALA-7250
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Frontend
>    Affects Versions: Impala 3.0, Impala 2.12.0
>            Reporter: Fredy Wijaya
>            Priority: Major
>
> {noformat}
> [localhost:21000] default> select datediff(day,now()) from test_table where 
> day>=(now() - interval 5 days) group by datediff(day,now());
> Query: select datediff(day,now()) from test_table where day>=(now() - 
> interval 5 days) group by datediff(day,now())
> Query submitted at: 2018-06-05 21:11:23 (Coordinator: http://impala-dev:25000)
> ERROR: AnalysisException: select list expression not produced by aggregation 
> output (missing from GROUP BY clause?): datediff(day, TIMESTAMP '2018-06-05 
> 21:11:23.320564000')
> [localhost:21000] default> set ENABLE_EXPR_REWRITES=0;
> ENABLE_EXPR_REWRITES set to 0
> [localhost:21000] default> select datediff(day,now()) from test_table where 
> day>=(now() - interval 5 days) group by datediff(day,now());
> Query: select datediff(day,now()) from test_table where day>=(now() - 
> interval 5 days) group by datediff(day,now())
> Query submitted at: 2018-06-05 21:11:31 (Coordinator: http://impala-dev:25000)
> Query progress can be monitored at: 
> http://impala-dev:25000/query_plan?query_id=b64c8eabcedc58e5:da9edc8600000000
> Fetched 0 row(s) in 0.21s
> {noformat}



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

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

Reply via email to