knizhnik / imcs

In-Memory Columnar Store extension for PostgreSQL
Apache License 2.0
201 stars 33 forks source link

feature request:numeric and timestamp cs cast to bpchar cs #16

Open amutu opened 10 years ago

amutu commented 10 years ago

now it is not support: postgres=# select cs_hash_count( cs_cast(ts,'bpchar') || stacktopsignature) from samp3_get(); ERROR: cast to timeseries of CHAR(N) is not supported CONTEXT: PL/pgSQL function cs_cast(timeseries,cs_elem_type) line 3 at RETURN Time: 0.485 ms postgres=# select cs_hash_count( cs_cast(ts,'varchar') || stacktopsignature) from samp3_get();
ERROR: cast to timeseries of CHAR(N) is not supported CONTEXT: PL/pgSQL function cs_cast(timeseries,cs_elem_type) line 3 at RETURN Time: 0.338 ms

so,result like this is not fuser riendly: postgres=# select s.cnt,s.grp from samp3_get(),cs_project(cs_hash_count( ts || stacktopsignature)) as s(cnt bigint,grp char(128)) order by 1 desc limit 10;
NOTICE: IMCS command: cat NOTICE: IMCS command: hash_count NOTICE: IMCS command: project cnt | grp
-----+---------------- 336 | \x1F)z\x0C\x01 129 | 112 | 112 | @\x0B\x17\x01 109 | 109 | &ʤ\x12\x01 108 | @\x0B\x17\x01 107 | \x16>\x11\x01 106 | 104 | &ʤ\x12\x01 (10 rows)

Time: 5777.381 ms