You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Hugo Bellomusto (JIRA)" <ji...@apache.org> on 2016/04/04 20:14:25 UTC

[jira] [Created] (DRILL-4575) alias not working on field.

Hugo Bellomusto created DRILL-4575:
--------------------------------------

             Summary: alias not working on field.
                 Key: DRILL-4575
                 URL: https://issues.apache.org/jira/browse/DRILL-4575
             Project: Apache Drill
          Issue Type: Bug
    Affects Versions: 1.6.0
         Environment: Apache drill 1.6.0
java 1.7.0_40
            Reporter: Hugo Bellomusto


{code:sql}
create table dfs.tmp.a_field as
select 'hello' field  from (VALUES(1));
select field   my_field   from dfs.tmp.a_field;
{code}

The result is:
||field||
|hello|

When should be:
||my_field||
|hello|

{noformat:title=physical plan}
00-00    Screen : rowType = RecordType(ANY field): rowcount = 1.0, cumulative cost = {1.1 rows, 1.1 cpu, 0.0 io, 0.0 network, 0.0 memory}, id = 1635
00-01      Scan(groupscan=[ParquetGroupScan [entries=[ReadEntryWithPath [path=hdfs://10.70.168.69:8020/tmp/a_field]], selectionRoot=hdfs://10.70.168.69:8020/tmp/a_field, numFiles=1, usedMetadataFile=false, columns=[`field`]]]) : rowType = RecordType(ANY field): rowcount = 1.0, cumulative cost = {1.0 rows, 1.0 cpu, 0.0 io, 0.0 network, 0.0 memory}, id = 1634
{noformat}


But, this works well:
{code:sql}
select concat(field, ' world')  my_field from dfs.tmp.a_field;
{code}
returns:
||my_field||
|hello world|

Additional info:
{code:sql}
select * from sys.options where name like '%parquet%' or string_val like '%parquet%';
{code}
||name||string_val|
|store.format|parquet|
|store.parquet.block-size| |
|store.parquet.compression|snappy|
|store.parquet.dictionary.page-size| |
|store.parquet.enable_dictionary_encoding| |
|store.parquet.page-size| |
|store.parquet.use_new_reader| |
|store.parquet.vector_fill_check_threshold| |
|store.parquet.vector_fill_threshold| |





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