[
https://issues.apache.org/jira/browse/IMPALA-7250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16534266#comment-16534266
]
Philip Zeyliger commented on IMPALA-7250:
-----------------------------------------
I've not checked in a debugger, but it's likely that {{now()}} is getting
rewritten into a constant, but it gets different values in different parts of
the query.
> 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]