incubator-drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Phillips <sphill...@maprtech.com>
Subject Re: convert_from example
Date Mon, 24 Nov 2014 23:24:06 GMT
It depends on how the value is encoded. Possible encodings include, e.g.
little endian, big endian, and UTF8 string.

select convert_from(row_key, 'INT'); // for little endian encoding
select convert_from(row_key, 'INT_BE'); // for big endian encoding
select cast(convert_from(row_key, 'UTF8') as int); // for utf8 string
encoding

On Mon, Nov 24, 2014 at 3:09 PM, carol Bourgade <cjbourgade@gmail.com>
wrote:

> can someone give an example using convert_from instead of cast in the
> following query on an HBase table :
>
> select cast(row_key as int) as cust_id
> from hbase.customers t ;
>



-- 
 Steven Phillips
 Software Engineer

 mapr.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message