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

Attila Magyar reassigned HIVE-25223:
------------------------------------


> Select with limit returns no rows on non native table
> -----------------------------------------------------
>
>                 Key: HIVE-25223
>                 URL: https://issues.apache.org/jira/browse/HIVE-25223
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Attila Magyar
>            Assignee: Attila Magyar
>            Priority: Major
>             Fix For: 4.0.0
>
>
> Str:
> {code:java}
> CREATE EXTERNAL TABLE hht (key string, value int) 
> STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
> WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf1:val")
> TBLPROPERTIES ("hbase.table.name" = "hht", "hbase.mapred.output.outputtable" 
> = "hht");
> insert into hht select uuid(), cast((rand() * 1000000) as int);
> insert into hht select uuid(), cast((rand() * 1000000) as int) from hht;
> insert into hht select uuid(), cast((rand() * 1000000) as int) from hht;
> insert into hht select uuid(), cast((rand() * 1000000) as int) from hht;
> insert into hht select uuid(), cast((rand() * 1000000) as int) from hht;
> insert into hht select uuid(), cast((rand() * 1000000) as int) from hht;
> insert into hht select uuid(), cast((rand() * 1000000) as int) from hht;
>  set hive.fetch.task.conversion=none;
>  select * from hht limit 10;
> +----------+------------+
> | hht.key  | hht.value  |
> +----------+------------+
> +----------+------------+
> No rows selected (5.22 seconds) {code}
>  
> This is caused by GlobalLimitOptimizer. The table directory is always empty 
> with a non native table since the data is not managed by hive (but hbase in 
> this case).
> The optimizer scans the directory and sets the file list to an empty list.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to