phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Soldatov <sergeysolda...@gmail.com>
Subject Re: TEXT Data type in Phoenix?
Date Wed, 30 Mar 2016 23:38:18 GMT
Jon,
It seems that documentation is a bit outdated. VARCHAR supports
exactly what you want:
create table x (id bigint primary key, x varchar);
upsert into x values (1, "..... (a lot of text there) " );
0: jdbc:phoenix:localhost> select length(x) from x;
+------------+
| LENGTH(X)  |
+------------+
| 1219       |
+------------+
1 row selected (0.009 seconds)

Thanks,
Sergey

On Wed, Mar 30, 2016 at 1:57 PM, Cox, Jonathan A <jacox@sandia.gov> wrote:
> Is it possible to have the equivalent of the SQL data type “TEXT” with
> Phoenix? The reason being, my data has columns with unspecified text length.
> If I go with a varchar,  loading the entire CSV file into the database may
> fail if one entry is too long.
>
>
>
> Maybe, however, there is really no reason to use TEXT with Phoenix? Perhaps
> just using VARCHAR with a very long size is equivalent in terms of
> performance and memory usage (given that Phoenix is HBase under the hood)?
>
>
>
> Thanks,
>
> Jon

Mime
View raw message