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

Jinfeng Ni updated DRILL-3781:
------------------------------
    Assignee: Aman Sinha  (was: Jinfeng Ni)

> Using CURRENT_DATE in a group by throws a column not found error for hive 
> tables and csv files
> ----------------------------------------------------------------------------------------------
>
>                 Key: DRILL-3781
>                 URL: https://issues.apache.org/jira/browse/DRILL-3781
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Functions - Drill, Query Planning & Optimization
>            Reporter: Rahul Challapalli
>            Assignee: Aman Sinha
>             Fix For: 1.2.0
>
>         Attachments: 
> 0002-DRILL-3781-Group-by-system-function-in-schema-based-.patch, 
> csv-error.log, hive_error.log
>
>
> 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 :
> {code}
> 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)
> {code}
> Query against csv files :
> {code}
> 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)
> {code}
> A similar query against json and parquet seems to be working fine
> {code}
> 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    |
> +---------------+
> {code}
> I attached the log files for the failing conditions. Let me know if you need 
> anything



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

Reply via email to