Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toolkit hyperloglog error : deserialization error invalid collation "pg_catalog"."en_US.UTF-8" #443

Closed
hardikm10 opened this issue Jun 7, 2022 · 1 comment · Fixed by #444
Labels
bug Something isn't working

Comments

@hardikm10
Copy link

Relevant system information:
timescaledb : 2.6.0
timescaledb_toolkit : 1.6.0
PostgreSQL 14.2
Platform : MST

Describe the bug
when hyperloglog is used on a varchar type column ,the error comes as :

sqlalchemy.exc.InternalError: (psycopg2.errors.InternalError_) deserialization error invalid collation "pg_catalog"."en_US.UTF-8"
CONTEXT: extension/src/[hyperloglog.rs](https://hyperloglog.rs/):126:31

To Reproduce

drop table sensor_data;

create table sensor_data( 
time timestamptz not null, 
sensor_id integer not null, 
cpu double precision null,
temperature double precision null,
operation_tag varchar(64) not null );

select from create_hypertable('sensor_data','time');

INSERT INTO sensor_data
SELECT
time + (INTERVAL '1 minute' * random()) AS time,
sensor_id,
random() AS cpu,
random()* 100 AS temperature,
concat('Operation ', sensor_id)
FROM
generate_series(now() - INTERVAL '1 months', now() - INTERVAL '1 week', INTERVAL '10 minute') AS g1(time),
generate_series(1, 100, 1 ) AS g2(sensor_id)
ORDER BY
time;


SELECT distinct_count(hyperloglog(64,operation_tag)) FROM sensor_data;
-- ERROR:  deserialization error invalid collation "pg_catalog"."en_US.UTF-8"
-- CONTEXT:  extension/src/hyperloglog.rs:126:31

Collation debug info :
168530422-89aa5482-6030-4c5e-9867-edd144d3e136

Expected behavior
It should not error out, and the query should run just fine.

Actual behavior
Like mentioned, error is causing query to fail.

@hardikm10 hardikm10 added the bug Something isn't working label Jun 7, 2022
@bors bors bot closed this as completed in 01590d8 Jun 22, 2022
@jerryxwu
Copy link
Contributor

@hardikm10 If you haven't noticed, we've just included the fix for this issue in the latest 1.8.0 release. We'd love to hear from our customers and users about whether it's working for them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants