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

Using CURRENT_DATE in a group by throws a column not found error for hive tables and csv files

    XMLWordPrintableJSON

Details

    Description

      Commit # : e43155d8eabb6fc2d0fa4c68c25d6e7c59bf4521

      Using CURRENT_DATE in a group by seems to failing against hive and csv files. With parquet and json, there seems to be no issues.

      Query against a hive table :

      select CURRENT_DATE from student_hive group by CURRENT_DATE;
      Error: PARSE ERROR: From line 1, column 48 to line 1, column 59: Column 'CURRENT_DATE' not found in any table
      
      
      [Error Id: e7d7df50-c5e8-4eda-990a-050b9a2b188e on qa-node190.qa.lab:31010] (state=,code=0)
      

      Query against csv files :

      select CURRENT_DATE  from `temp.tbl` group by CURRENT_DATE;
      Error: DATA_READ ERROR: Selected column 'CURRENT_DATE' must have name 'columns' or must be plain '*'
      
      File Path maprfs:///drill/testdata/temp.tbl
      Fragment 0:0
      
      [Error Id: 1856f171-966e-4078-bbea-7ff3e9e22e15 on qa-node190.qa.lab:31010] (state=,code=0)
      

      A similar query against json and parquet seems to be working fine

      select current_date from `a.json` group by current_date;
      +---------------+
      | current_date  |
      +---------------+
      | 2015-09-14    |
      +---------------+
      
      select CURRENT_DATE from cp.`tpch/lineitem.parquet` group by CURRENT_DATE;
      +---------------+
      | CURRENT_DATE  |
      +---------------+
      | 2015-09-14    |
      +---------------+
      

      I attached the log files for the failing conditions. Let me know if you need anything

      Attachments

        1. hive_error.log
          6 kB
          Rahul Kumar Challapalli
        2. csv-error.log
          8 kB
          Rahul Kumar Challapalli
        3. 0002-DRILL-3781-Group-by-system-function-in-schema-based-.patch
          3 kB
          Jinfeng Ni

        Issue Links

          Activity

            People

              jni Jinfeng Ni
              rkins Rahul Kumar Challapalli
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: