Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-3798

Cannot group by the functions without ()

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 1.1.0
    • Fix Version/s: None
    • Component/s: Functions - Drill
    • Labels:
      None

      Description

      Drill can not group-by the function without ().
      eg:

      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
      

      Bad ones:

      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;
      

      Good ones:

      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();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jni Jinfeng Ni
                Reporter:
                haozhu Hao Zhu
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: