[
https://issues.apache.org/jira/browse/DRILL-4079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15004992#comment-15004992
]
Rahul Challapalli commented on DRILL-4079:
------------------------------------------
The below 2 queries are yielding the same results
{code}
select * from data where col='';
select * from data where col=' ';
{code}
> 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
> 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.3.4#6332)