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

2016-04-06 Thread Hugo Bellomusto (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-4575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15228817#comment-15228817
 ] 

Hugo Bellomusto commented on DRILL-4575:


It sounds different, in DRILL-4572 error happens when using functions.
Here, I use a function to make it work.


> 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-00Screen : 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)


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

2016-04-04 Thread John Omernik (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-4575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15224791#comment-15224791
 ] 

John Omernik commented on DRILL-4575:
-

Might this be related to

https://issues.apache.org/jira/browse/DRILL-4572

> 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-00Screen : 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)