[jira] [Commented] (HIVE-19743) hive is not pushing predicate down to HBaseStorageHandler if hive key mapped with hbase is stored as varchar

2018-06-11 Thread Rajkumar Singh (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-19743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16508837#comment-16508837
 ] 

Rajkumar Singh commented on HIVE-19743:
---

varchar() != string - that make sense, closing this jira, Thanks for your help.

> hive is not pushing predicate down to HBaseStorageHandler if hive key mapped 
> with hbase is stored as varchar
> 
>
> Key: HIVE-19743
> URL: https://issues.apache.org/jira/browse/HIVE-19743
> Project: Hive
>  Issue Type: Bug
>  Components: HBase Handler, Hive
>Affects Versions: 2.1.0
> Environment: java8,centos7
>Reporter: Rajkumar Singh
>Priority: Major
>
> Steps to Reproduce:
> {code}
> //hbase table
> create 'mytable', 'cf'
> put 'mytable', 'ABCDEF|GHIJK|ijj123kl-mn4o-4pq5-678r-st90123u0v4', 
> 'cf:message', 'hello world'
> put 'mytable', 'ABCDEF1|GHIJK1|ijj123kl-mn4o-4pq5-678r-st90123u0v41', 
> 'cf:foo', 0x0
> // hive table with key stored as varchar
> show create table hbase_table_4;
> +---+--+
> |                      createtab_stmt                       |
> +---+--+
> | CREATE EXTERNAL TABLE `hbase_table_4`(                    |
> |   `hbase_key` varchar(80) COMMENT 'from deserializer',    |
> |   `value` string COMMENT 'from deserializer',             |
> |   `value1` string COMMENT 'from deserializer')            |
> | ROW FORMAT SERDE                                          |
> |   'org.apache.hadoop.hive.hbase.HBaseSerDe'               |
> | STORED BY                                                 |
> |   'org.apache.hadoop.hive.hbase.HBaseStorageHandler'      |
> | WITH SERDEPROPERTIES (                                    |
> |   'hbase.columns.mapping'=':key,cf:foo,cf:message',       |
> |   'serialization.format'='1')                             |
> | TBLPROPERTIES (                                           |
> |   'COLUMN_STATS_ACCURATE'='\{\"BASIC_STATS\":\"true\"}',   |
> |   'hbase.table.name'='mytable',                           |
> |   'numFiles'='0',                                         |
> |   'numRows'='0',                                          |
> |   'rawDataSize'='0',                                      |
> |   'totalSize'='0',                                        |
> |   'transient_lastDdlTime'='1527708430')                   |
> +---+--+
>  
> // hive table key stored as string
> CREATE EXTERNAL TABLE `hbase_table_5`(                    |
> |   `hbase_key` string COMMENT 'from deserializer',         |
> |   `value` string COMMENT 'from deserializer',             |
> |   `value1` string COMMENT 'from deserializer')            |
> | ROW FORMAT SERDE                                          |
> |   'org.apache.hadoop.hive.hbase.HBaseSerDe'               |
> | STORED BY                                                 |
> |   'org.apache.hadoop.hive.hbase.HBaseStorageHandler'      |
> | WITH SERDEPROPERTIES (                                    |
> |   'hbase.columns.mapping'=':key,cf:foo,cf:message',       |
> |   'serialization.format'='1')                             |
> | TBLPROPERTIES (                                           |
> |   'COLUMN_STATS_ACCURATE'='\{\"BASIC_STATS\":\"true\"}',   |
> |   'hbase.table.name'='mytable',                           |
> |   'numFiles'='0',                                         |
> |   'numRows'='0',                                          |
> |   'rawDataSize'='0',                                      |
> |   'totalSize'='0',                                        |
> |   'transient_lastDdlTime'='1527708520')                   |
>  
> Explain Plan
>  explain select * from hbase_table_4 where 
> hbase_key='ABCDEF|GHIJK|ijj123kl-mn4o-4pq5-678r-st90123u0v4'
>  Stage-0                                                                      
>                     |
> |   Fetch Operator                                                            
>                      |
> |     limit:-1                                                                
>                      |
> |     Select Operator [SEL_2]                                                 
>                      |
> |       Output:["_col0","_col1","_col2"]                                      
>                      |
> |       Filter Operator [FIL_4]                                               
>                      |
> |         predicate:(UDFToString(hbase_key) = 
> 'ABCDEF|GHIJK|ijj123kl-mn4o-4pq5-678r-st90123u0v4')  |
> |         TableScan [TS_0]                                                    
>                      |
> |           Output:["hbase_key","value","value1"] 
>  
> 

[jira] [Commented] (HIVE-19743) hive is not pushing predicate down to HBaseStorageHandler if hive key mapped with hbase is stored as varchar

2018-05-31 Thread Gopal V (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-19743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16497291#comment-16497291
 ] 

Gopal V commented on HIVE-19743:


Yes, that is correct because varchar() != string, does it work right when you 
cast the constants to the right type?

{code}
hive> explain select count(1) from foo where y = cast('1' as varchar(10));
OK
Plan optimized by CBO.

Vertex dependency in root stage
Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE)

Stage-0
  Fetch Operator
limit:-1
Stage-1
  Reducer 2 vectorized, llap
  File Output Operator [FS_14]
Group By Operator [GBY_13] (rows=1 width=102)
  Output:["_col0"],aggregations:["count(VALUE._col0)"]
<-Map 1 [CUSTOM_SIMPLE_EDGE] vectorized, llap
  PARTITION_ONLY_SHUFFLE [RS_12]
Group By Operator [GBY_11] (rows=1 width=102)
  Output:["_col0"],aggregations:["count()"]
  Select Operator [SEL_10] (rows=1 width=94)
Filter Operator [FIL_9] (rows=1 width=94)
  predicate:(y = '1')
  TableScan [TS_0] (rows=1 width=94)
default@foo,foo,Tbl:COMPLETE,Col:NONE,Output:["y"]

Time taken: 0.177 seconds, Fetched: 23 row(s)
{code}


> hive is not pushing predicate down to HBaseStorageHandler if hive key mapped 
> with hbase is stored as varchar
> 
>
> Key: HIVE-19743
> URL: https://issues.apache.org/jira/browse/HIVE-19743
> Project: Hive
>  Issue Type: Bug
>  Components: HBase Handler, Hive
>Affects Versions: 2.1.0
> Environment: java8,centos7
>Reporter: Rajkumar Singh
>Priority: Major
>
> Steps to Reproduce:
> {code}
> //hbase table
> create 'mytable', 'cf'
> put 'mytable', 'ABCDEF|GHIJK|ijj123kl-mn4o-4pq5-678r-st90123u0v4', 
> 'cf:message', 'hello world'
> put 'mytable', 'ABCDEF1|GHIJK1|ijj123kl-mn4o-4pq5-678r-st90123u0v41', 
> 'cf:foo', 0x0
> // hive table with key stored as varchar
> show create table hbase_table_4;
> +---+--+
> |                      createtab_stmt                       |
> +---+--+
> | CREATE EXTERNAL TABLE `hbase_table_4`(                    |
> |   `hbase_key` varchar(80) COMMENT 'from deserializer',    |
> |   `value` string COMMENT 'from deserializer',             |
> |   `value1` string COMMENT 'from deserializer')            |
> | ROW FORMAT SERDE                                          |
> |   'org.apache.hadoop.hive.hbase.HBaseSerDe'               |
> | STORED BY                                                 |
> |   'org.apache.hadoop.hive.hbase.HBaseStorageHandler'      |
> | WITH SERDEPROPERTIES (                                    |
> |   'hbase.columns.mapping'=':key,cf:foo,cf:message',       |
> |   'serialization.format'='1')                             |
> | TBLPROPERTIES (                                           |
> |   'COLUMN_STATS_ACCURATE'='\{\"BASIC_STATS\":\"true\"}',   |
> |   'hbase.table.name'='mytable',                           |
> |   'numFiles'='0',                                         |
> |   'numRows'='0',                                          |
> |   'rawDataSize'='0',                                      |
> |   'totalSize'='0',                                        |
> |   'transient_lastDdlTime'='1527708430')                   |
> +---+--+
>  
> // hive table key stored as string
> CREATE EXTERNAL TABLE `hbase_table_5`(                    |
> |   `hbase_key` string COMMENT 'from deserializer',         |
> |   `value` string COMMENT 'from deserializer',             |
> |   `value1` string COMMENT 'from deserializer')            |
> | ROW FORMAT SERDE                                          |
> |   'org.apache.hadoop.hive.hbase.HBaseSerDe'               |
> | STORED BY                                                 |
> |   'org.apache.hadoop.hive.hbase.HBaseStorageHandler'      |
> | WITH SERDEPROPERTIES (                                    |
> |   'hbase.columns.mapping'=':key,cf:foo,cf:message',       |
> |   'serialization.format'='1')                             |
> | TBLPROPERTIES (                                           |
> |   'COLUMN_STATS_ACCURATE'='\{\"BASIC_STATS\":\"true\"}',   |
> |   'hbase.table.name'='mytable',                           |
> |   'numFiles'='0',                                         |
> |   'numRows'='0',                                          |
> |   'rawDataSize'='0',                                      |
> |   'totalSize'='0',                                        |
> |   'transient_lastDdlTime'='1527708520')                   |
>  
> Explain Plan
>  explain select * from 

[jira] [Commented] (HIVE-19743) hive is not pushing predicate down to HBaseStorageHandler if hive key mapped with hbase is stored as varchar

2018-05-31 Thread Rajkumar Singh (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-19743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16497081#comment-16497081
 ] 

Rajkumar Singh commented on HIVE-19743:
---

[https://github.com/apache/hive/blob/master/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseStorageHandler.java#L420]

In HIVE-13831, it checks for the same type, if there is mismatch it calculates 
residualPredicate which hive has to handle.

 

> hive is not pushing predicate down to HBaseStorageHandler if hive key mapped 
> with hbase is stored as varchar
> 
>
> Key: HIVE-19743
> URL: https://issues.apache.org/jira/browse/HIVE-19743
> Project: Hive
>  Issue Type: Bug
>  Components: HBase Handler, Hive
>Affects Versions: 2.1.0
> Environment: java8,centos7
>Reporter: Rajkumar Singh
>Priority: Major
>
> Steps to Reproduce:
> {code}
> //hbase table
> create 'mytable', 'cf'
> put 'mytable', 'ABCDEF|GHIJK|ijj123kl-mn4o-4pq5-678r-st90123u0v4', 
> 'cf:message', 'hello world'
> put 'mytable', 'ABCDEF1|GHIJK1|ijj123kl-mn4o-4pq5-678r-st90123u0v41', 
> 'cf:foo', 0x0
> // hive table with key stored as varchar
> show create table hbase_table_4;
> +---+--+
> |                      createtab_stmt                       |
> +---+--+
> | CREATE EXTERNAL TABLE `hbase_table_4`(                    |
> |   `hbase_key` varchar(80) COMMENT 'from deserializer',    |
> |   `value` string COMMENT 'from deserializer',             |
> |   `value1` string COMMENT 'from deserializer')            |
> | ROW FORMAT SERDE                                          |
> |   'org.apache.hadoop.hive.hbase.HBaseSerDe'               |
> | STORED BY                                                 |
> |   'org.apache.hadoop.hive.hbase.HBaseStorageHandler'      |
> | WITH SERDEPROPERTIES (                                    |
> |   'hbase.columns.mapping'=':key,cf:foo,cf:message',       |
> |   'serialization.format'='1')                             |
> | TBLPROPERTIES (                                           |
> |   'COLUMN_STATS_ACCURATE'='\{\"BASIC_STATS\":\"true\"}',   |
> |   'hbase.table.name'='mytable',                           |
> |   'numFiles'='0',                                         |
> |   'numRows'='0',                                          |
> |   'rawDataSize'='0',                                      |
> |   'totalSize'='0',                                        |
> |   'transient_lastDdlTime'='1527708430')                   |
> +---+--+
>  
> // hive table key stored as string
> CREATE EXTERNAL TABLE `hbase_table_5`(                    |
> |   `hbase_key` string COMMENT 'from deserializer',         |
> |   `value` string COMMENT 'from deserializer',             |
> |   `value1` string COMMENT 'from deserializer')            |
> | ROW FORMAT SERDE                                          |
> |   'org.apache.hadoop.hive.hbase.HBaseSerDe'               |
> | STORED BY                                                 |
> |   'org.apache.hadoop.hive.hbase.HBaseStorageHandler'      |
> | WITH SERDEPROPERTIES (                                    |
> |   'hbase.columns.mapping'=':key,cf:foo,cf:message',       |
> |   'serialization.format'='1')                             |
> | TBLPROPERTIES (                                           |
> |   'COLUMN_STATS_ACCURATE'='\{\"BASIC_STATS\":\"true\"}',   |
> |   'hbase.table.name'='mytable',                           |
> |   'numFiles'='0',                                         |
> |   'numRows'='0',                                          |
> |   'rawDataSize'='0',                                      |
> |   'totalSize'='0',                                        |
> |   'transient_lastDdlTime'='1527708520')                   |
>  
> Explain Plan
>  explain select * from hbase_table_4 where 
> hbase_key='ABCDEF|GHIJK|ijj123kl-mn4o-4pq5-678r-st90123u0v4'
>  Stage-0                                                                      
>                     |
> |   Fetch Operator                                                            
>                      |
> |     limit:-1                                                                
>                      |
> |     Select Operator [SEL_2]                                                 
>                      |
> |       Output:["_col0","_col1","_col2"]                                      
>                      |
> |       Filter Operator [FIL_4]                                               
>                      |
> |         predicate:(UDFToString(hbase_key) = 
> 

[jira] [Commented] (HIVE-19743) hive is not pushing predicate down to HBaseStorageHandler if hive key mapped with hbase is stored as varchar

2018-05-31 Thread Gopal V (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-19743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16497039#comment-16497039
 ] 

Gopal V commented on HIVE-19743:


The 13831 change is actually about Hive sort-order vs Hbase sort-order - the 
issue here is more related to how hive handles mismatched types when you do 
(varchar(n) = String), it converts both to String, even if the rhs is a 
constant.

> hive is not pushing predicate down to HBaseStorageHandler if hive key mapped 
> with hbase is stored as varchar
> 
>
> Key: HIVE-19743
> URL: https://issues.apache.org/jira/browse/HIVE-19743
> Project: Hive
>  Issue Type: Bug
>  Components: HBase Handler, Hive
>Affects Versions: 2.1.0
> Environment: java8,centos7
>Reporter: Rajkumar Singh
>Priority: Major
>
> Steps to Reproduce:
> {code}
> //hbase table
> create 'mytable', 'cf'
> put 'mytable', 'ABCDEF|GHIJK|ijj123kl-mn4o-4pq5-678r-st90123u0v4', 
> 'cf:message', 'hello world'
> put 'mytable', 'ABCDEF1|GHIJK1|ijj123kl-mn4o-4pq5-678r-st90123u0v41', 
> 'cf:foo', 0x0
> // hive table with key stored as varchar
> show create table hbase_table_4;
> +---+--+
> |                      createtab_stmt                       |
> +---+--+
> | CREATE EXTERNAL TABLE `hbase_table_4`(                    |
> |   `hbase_key` varchar(80) COMMENT 'from deserializer',    |
> |   `value` string COMMENT 'from deserializer',             |
> |   `value1` string COMMENT 'from deserializer')            |
> | ROW FORMAT SERDE                                          |
> |   'org.apache.hadoop.hive.hbase.HBaseSerDe'               |
> | STORED BY                                                 |
> |   'org.apache.hadoop.hive.hbase.HBaseStorageHandler'      |
> | WITH SERDEPROPERTIES (                                    |
> |   'hbase.columns.mapping'=':key,cf:foo,cf:message',       |
> |   'serialization.format'='1')                             |
> | TBLPROPERTIES (                                           |
> |   'COLUMN_STATS_ACCURATE'='\{\"BASIC_STATS\":\"true\"}',   |
> |   'hbase.table.name'='mytable',                           |
> |   'numFiles'='0',                                         |
> |   'numRows'='0',                                          |
> |   'rawDataSize'='0',                                      |
> |   'totalSize'='0',                                        |
> |   'transient_lastDdlTime'='1527708430')                   |
> +---+--+
>  
> // hive table key stored as string
> CREATE EXTERNAL TABLE `hbase_table_5`(                    |
> |   `hbase_key` string COMMENT 'from deserializer',         |
> |   `value` string COMMENT 'from deserializer',             |
> |   `value1` string COMMENT 'from deserializer')            |
> | ROW FORMAT SERDE                                          |
> |   'org.apache.hadoop.hive.hbase.HBaseSerDe'               |
> | STORED BY                                                 |
> |   'org.apache.hadoop.hive.hbase.HBaseStorageHandler'      |
> | WITH SERDEPROPERTIES (                                    |
> |   'hbase.columns.mapping'=':key,cf:foo,cf:message',       |
> |   'serialization.format'='1')                             |
> | TBLPROPERTIES (                                           |
> |   'COLUMN_STATS_ACCURATE'='\{\"BASIC_STATS\":\"true\"}',   |
> |   'hbase.table.name'='mytable',                           |
> |   'numFiles'='0',                                         |
> |   'numRows'='0',                                          |
> |   'rawDataSize'='0',                                      |
> |   'totalSize'='0',                                        |
> |   'transient_lastDdlTime'='1527708520')                   |
>  
> Explain Plan
>  explain select * from hbase_table_4 where 
> hbase_key='ABCDEF|GHIJK|ijj123kl-mn4o-4pq5-678r-st90123u0v4'
>  Stage-0                                                                      
>                     |
> |   Fetch Operator                                                            
>                      |
> |     limit:-1                                                                
>                      |
> |     Select Operator [SEL_2]                                                 
>                      |
> |       Output:["_col0","_col1","_col2"]                                      
>                      |
> |       Filter Operator [FIL_4]                                               
>                      |
> |         predicate:(UDFToString(hbase_key) = 
> 'ABCDEF|GHIJK|ijj123kl-mn4o-4pq5-678r-st90123u0v4')  |
> |         TableScan 

[jira] [Commented] (HIVE-19743) hive is not pushing predicate down to HBaseStorageHandler if hive key mapped with hbase is stored as varchar

2018-05-30 Thread Rajkumar Singh (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-19743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16495741#comment-16495741
 ] 

Rajkumar Singh commented on HIVE-19743:
---

this seems to be an intentional change as part of 
https://issues.apache.org/jira/browse/HIVE-13831, should not be treated varchar 
equivalent to string?

> hive is not pushing predicate down to HBaseStorageHandler if hive key mapped 
> with hbase is stored as varchar
> 
>
> Key: HIVE-19743
> URL: https://issues.apache.org/jira/browse/HIVE-19743
> Project: Hive
>  Issue Type: Bug
>  Components: HBase Handler, Hive
>Affects Versions: 2.1.0
> Environment: java8,centos7
>Reporter: Rajkumar Singh
>Priority: Major
>
> Steps to Reproduce:
> {code}
> //hbase table
> create 'mytable', 'cf'
> put 'mytable', 'ABCDEF|GHIJK|ijj123kl-mn4o-4pq5-678r-st90123u0v4', 
> 'cf:message', 'hello world'
> put 'mytable', 'ABCDEF1|GHIJK1|ijj123kl-mn4o-4pq5-678r-st90123u0v41', 
> 'cf:foo', 0x0
> // hive table with key stored as varchar
> show create table hbase_table_4;
> +---+--+
> |                      createtab_stmt                       |
> +---+--+
> | CREATE EXTERNAL TABLE `hbase_table_4`(                    |
> |   `hbase_key` varchar(80) COMMENT 'from deserializer',    |
> |   `value` string COMMENT 'from deserializer',             |
> |   `value1` string COMMENT 'from deserializer')            |
> | ROW FORMAT SERDE                                          |
> |   'org.apache.hadoop.hive.hbase.HBaseSerDe'               |
> | STORED BY                                                 |
> |   'org.apache.hadoop.hive.hbase.HBaseStorageHandler'      |
> | WITH SERDEPROPERTIES (                                    |
> |   'hbase.columns.mapping'=':key,cf:foo,cf:message',       |
> |   'serialization.format'='1')                             |
> | TBLPROPERTIES (                                           |
> |   'COLUMN_STATS_ACCURATE'='\{\"BASIC_STATS\":\"true\"}',   |
> |   'hbase.table.name'='mytable',                           |
> |   'numFiles'='0',                                         |
> |   'numRows'='0',                                          |
> |   'rawDataSize'='0',                                      |
> |   'totalSize'='0',                                        |
> |   'transient_lastDdlTime'='1527708430')                   |
> +---+--+
>  
> // hive table key stored as string
> CREATE EXTERNAL TABLE `hbase_table_5`(                    |
> |   `hbase_key` string COMMENT 'from deserializer',         |
> |   `value` string COMMENT 'from deserializer',             |
> |   `value1` string COMMENT 'from deserializer')            |
> | ROW FORMAT SERDE                                          |
> |   'org.apache.hadoop.hive.hbase.HBaseSerDe'               |
> | STORED BY                                                 |
> |   'org.apache.hadoop.hive.hbase.HBaseStorageHandler'      |
> | WITH SERDEPROPERTIES (                                    |
> |   'hbase.columns.mapping'=':key,cf:foo,cf:message',       |
> |   'serialization.format'='1')                             |
> | TBLPROPERTIES (                                           |
> |   'COLUMN_STATS_ACCURATE'='\{\"BASIC_STATS\":\"true\"}',   |
> |   'hbase.table.name'='mytable',                           |
> |   'numFiles'='0',                                         |
> |   'numRows'='0',                                          |
> |   'rawDataSize'='0',                                      |
> |   'totalSize'='0',                                        |
> |   'transient_lastDdlTime'='1527708520')                   |
>  
> Explain Plan
>  explain select * from hbase_table_4 where 
> hbase_key='ABCDEF|GHIJK|ijj123kl-mn4o-4pq5-678r-st90123u0v4'
>  Stage-0                                                                      
>                     |
> |   Fetch Operator                                                            
>                      |
> |     limit:-1                                                                
>                      |
> |     Select Operator [SEL_2]                                                 
>                      |
> |       Output:["_col0","_col1","_col2"]                                      
>                      |
> |       Filter Operator [FIL_4]                                               
>                      |
> |         predicate:(UDFToString(hbase_key) = 
> 'ABCDEF|GHIJK|ijj123kl-mn4o-4pq5-678r-st90123u0v4')  |
> |         TableScan [TS_0]                                                    
>          

[jira] [Commented] (HIVE-19743) hive is not pushing predicate down to HBaseStorageHandler if hive key mapped with hbase is stored as varchar

2018-05-30 Thread Gopal V (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-19743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16495740#comment-16495740
 ] 

Gopal V commented on HIVE-19743:


UDFToString(col) = 

instead of 

col = cast( as varchar(n))

> hive is not pushing predicate down to HBaseStorageHandler if hive key mapped 
> with hbase is stored as varchar
> 
>
> Key: HIVE-19743
> URL: https://issues.apache.org/jira/browse/HIVE-19743
> Project: Hive
>  Issue Type: Bug
>  Components: HBase Handler, Hive
>Affects Versions: 2.1.0
> Environment: java8,centos7
>Reporter: Rajkumar Singh
>Priority: Major
>
> Steps to Reproduce:
> {code}
> //hbase table
> create 'mytable', 'cf'
> put 'mytable', 'ABCDEF|GHIJK|ijj123kl-mn4o-4pq5-678r-st90123u0v4', 
> 'cf:message', 'hello world'
> put 'mytable', 'ABCDEF1|GHIJK1|ijj123kl-mn4o-4pq5-678r-st90123u0v41', 
> 'cf:foo', 0x0
> // hive table with key stored as varchar
> show create table hbase_table_4;
> +---+--+
> |                      createtab_stmt                       |
> +---+--+
> | CREATE EXTERNAL TABLE `hbase_table_4`(                    |
> |   `hbase_key` varchar(80) COMMENT 'from deserializer',    |
> |   `value` string COMMENT 'from deserializer',             |
> |   `value1` string COMMENT 'from deserializer')            |
> | ROW FORMAT SERDE                                          |
> |   'org.apache.hadoop.hive.hbase.HBaseSerDe'               |
> | STORED BY                                                 |
> |   'org.apache.hadoop.hive.hbase.HBaseStorageHandler'      |
> | WITH SERDEPROPERTIES (                                    |
> |   'hbase.columns.mapping'=':key,cf:foo,cf:message',       |
> |   'serialization.format'='1')                             |
> | TBLPROPERTIES (                                           |
> |   'COLUMN_STATS_ACCURATE'='\{\"BASIC_STATS\":\"true\"}',   |
> |   'hbase.table.name'='mytable',                           |
> |   'numFiles'='0',                                         |
> |   'numRows'='0',                                          |
> |   'rawDataSize'='0',                                      |
> |   'totalSize'='0',                                        |
> |   'transient_lastDdlTime'='1527708430')                   |
> +---+--+
>  
> // hive table key stored as string
> CREATE EXTERNAL TABLE `hbase_table_5`(                    |
> |   `hbase_key` string COMMENT 'from deserializer',         |
> |   `value` string COMMENT 'from deserializer',             |
> |   `value1` string COMMENT 'from deserializer')            |
> | ROW FORMAT SERDE                                          |
> |   'org.apache.hadoop.hive.hbase.HBaseSerDe'               |
> | STORED BY                                                 |
> |   'org.apache.hadoop.hive.hbase.HBaseStorageHandler'      |
> | WITH SERDEPROPERTIES (                                    |
> |   'hbase.columns.mapping'=':key,cf:foo,cf:message',       |
> |   'serialization.format'='1')                             |
> | TBLPROPERTIES (                                           |
> |   'COLUMN_STATS_ACCURATE'='\{\"BASIC_STATS\":\"true\"}',   |
> |   'hbase.table.name'='mytable',                           |
> |   'numFiles'='0',                                         |
> |   'numRows'='0',                                          |
> |   'rawDataSize'='0',                                      |
> |   'totalSize'='0',                                        |
> |   'transient_lastDdlTime'='1527708520')                   |
>  
> Explain Plan
>  explain select * from hbase_table_4 where 
> hbase_key='ABCDEF|GHIJK|ijj123kl-mn4o-4pq5-678r-st90123u0v4'
>  Stage-0                                                                      
>                     |
> |   Fetch Operator                                                            
>                      |
> |     limit:-1                                                                
>                      |
> |     Select Operator [SEL_2]                                                 
>                      |
> |       Output:["_col0","_col1","_col2"]                                      
>                      |
> |       Filter Operator [FIL_4]                                               
>                      |
> |         predicate:(UDFToString(hbase_key) = 
> 'ABCDEF|GHIJK|ijj123kl-mn4o-4pq5-678r-st90123u0v4')  |
> |         TableScan [TS_0]                                                    
>                      |
> |           Output:["hbase_key","value","value1"] 
>  
> explain on table with key stored