[ 
https://issues.apache.org/jira/browse/DRILL-3798?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jinfeng Ni resolved DRILL-3798.
-------------------------------
    Resolution: Duplicate

> Cannot group by the functions without ()
> ----------------------------------------
>
>                 Key: DRILL-3798
>                 URL: https://issues.apache.org/jira/browse/DRILL-3798
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Functions - Drill
>    Affects Versions: 1.1.0
>            Reporter: Hao Zhu
>            Assignee: Jinfeng Ni
>
> Drill can not group-by the function without ().
> eg:
> {code}
> SELECT CURRENT_DATE 
> FROM hive.h1db.testdate
> group  by CURRENT_DATE;
>   Caused By (org.apache.calcite.sql.validate.SqlValidatorException) Column 
> 'CURRENT_DATE' not found in any table
> {code}
> Bad ones:
> {code}
> SELECT CURRENT_TIME 
> FROM hive.h1db.testdate
> group  by CURRENT_TIME;
> SELECT CURRENT_TIMESTAMP 
> FROM hive.h1db.testdate
> group  by CURRENT_TIMESTAMP;
> SELECT LOCALTIME 
> FROM hive.h1db.testdate
> group  by LOCALTIME;
> SELECT LOCALTIMESTAMP 
> FROM hive.h1db.testdate
> group  by LOCALTIMESTAMP;
> {code}
> Good ones:
> {code}
> SELECT NOW()
> FROM hive.h1db.testdate
> group  by NOW();
> SELECT TIMEOFDAY()
> FROM hive.h1db.testdate
> group  by TIMEOFDAY();
> SELECT UNIX_TIMESTAMP()
> FROM hive.h1db.testdate
> group  by UNIX_TIMESTAMP();
> SELECT PI()
> FROM hive.h1db.testdate
> group  by  PI();
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to