You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Volodymyr Vysotskyi (JIRA)" <ji...@apache.org> on 2017/06/26 10:41:00 UTC

[jira] [Comment Edited] (DRILL-4079) Hive: Filter with a trailing space is not working

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

Volodymyr Vysotskyi edited comment on DRILL-4079 at 6/26/17 10:40 AM:
----------------------------------------------------------------------

[~rkins] I don't see these spaces in the second column in the Data. Without them, Drill returns the same results as Hive:
{noformat}
hive> select * from empty_lengthy_p2 where varchar_col='         ';
OK
Time taken: 0.329 seconds
{noformat}
When I am inserting spaces manually in the Data, Drill returns correct result:
{noformat}
+----------+--------------+
| int_col  | varchar_col  |
+----------+--------------+
| 6        |              |
| 9        |              |
+----------+--------------+
{noformat}
Data with the spaces:
{noformat}
1|dhfawriuueiq dshfjklhfiue eiufhwelfhleiruhj ejfwekjlf $
2|jkdshgf jhg sdgj dlsg jsdgjg    jkdhgiergergd fgjgioug$
3|dfg
4|sdjklhkhjdfgjhdfgkjhdfkjldfsgjdsfkjhdfmnb,cv
5|dfg
6|         
7|jkdshgf jhg sdgj dlsg jsdgjg    jkdhgiergergd fgjgioug$
8|?
9|         
10|?
{noformat}
My steps:
1. create empty_lengthy table;
2. put the data file in the folder /drill/testdata/partition_pruning/hive/empty_lengthy_partitions.tbl
3. create empty_lengthy_p2 table;
4. SET hive.exec.dynamic.partition.mode=true;
5. insert data from empty_lengthy table to the empty_lengthy_p2.

Could you please check that Data is displayed in the Jira correctly and this bug is still reproduced? 


was (Author: vvysotskyi):
[~rkins] I don't see these spaces in the second column in the Data. Without them, Drill returns the same results as Hive. When I am inserting spaces manually in the Data, Drill returns correct result. 

Could you please check that Data is displayed in the Jira correctly and this bug is still reproduced?

> Hive: Filter with a trailing space is not working
> -------------------------------------------------
>
>                 Key: DRILL-4079
>                 URL: https://issues.apache.org/jira/browse/DRILL-4079
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - Hive
>            Reporter: Rahul Challapalli
>            Assignee: Volodymyr Vysotskyi
>            Priority: Critical
>
> The below query does not return the right result
> {code}
> select * from hive.empty_lengthy_p2 where varchar_col='         ';
> +----------+--------------+
> | int_col  | varchar_col  |
> +----------+--------------+
> +----------+--------------+
> No rows selected (0.393 seconds)
> {code}
> Data : 
> {code}
> 1|dhfawriuueiq dshfjklhfiue eiufhwelfhleiruhj ejfwekjlf hsjdkgfhsdjk  hjd hdfkh sdhg dkj hsdhg jds gsdlgd sd hjk sdjhkjdhgsdhg
> 2|jkdshgf jhg sdgj dlsg jsdgjg    jkdhgiergergd fgjgioug8945u irjfoiej0930j pofkqpgogogj dogj09g djvkldsjgjgirewoie dkflvsd vkdvskgjiwegjwe;sdkvjsdgfdgksdjgkdjkdjgksjg sdkjgdsjg skdjggj;sdgjd sk;gjsd
> 3|dfg
> 4|sdjklhkhjdfgjhdfgkjhdfkjldfsgjdsfkjhdfmnb,cv
> 5|dfg
> 6|
> 7|jkdshgf jhg sdgj dlsg jsdgjg    jkdhgiergergd fgjgioug8945u irjfoiej0930j pofkqpgogogj dogj09g djvkldsjgjgirewoie dkflvsd vkdvskgjiwegjwe;sdkvjsdgfdgksdjgkdjkdjgksjg sdkjgdsjg skdjggj;sdgjd sk;gjsd
> 8|?
> 9|
> 10|?
> {code}
> Hive DDL :
> {code}
> DROP TABLE IF EXISTS empty_lengthy;
> CREATE EXTERNAL TABLE empty_lengthy (
>     int_col INT,
>     varchar_col STRING
>    )
> ROW FORMAT DELIMITED FIELDS TERMINATED BY "|"
> STORED AS TEXTFILE LOCATION "/drill/testdata/partition_pruning/hive/empty_lengthy_partitions.tbl";
> DROP TABLE IF EXISTS empty_lengthy_p2;
> CREATE TABLE empty_lengthy_p2 (
>     int_col INT
>    )
> PARTITIONED BY (varchar_col STRING)
> ROW FORMAT DELIMITED FIELDS TERMINATED BY "|"
> STORED AS TEXTFILE LOCATION "/drill/testdata/partition_pruning/hive/empty_lengthy_partitions_p2"
> TBLPROPERTIES ("serialization.null.format"="?");
> SET hive.exec.dynamic.partition.mode=true;
> insert overwrite table empty_lengthy_p2 partition (varchar_col)
> select int_col, varchar_col from empty_lengthy;
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)