Skip to content

Different results for same postgres and clickhouse queries #21

Open
@josefinaestevez

Description

@josefinaestevez

I've noticed that some queries shows different results in postgres and clickhouse when, if I'm not wrong, they should be the same.

A simple example:

Postgres

SELECT COUNT(DISTINCT relation_id) FROM clickhouse_table WHERE relation_id IN (SELECT relation_id FROM clickhouse_table WHERE date_from > '2019-02-01');
 count 
-------
   116
(1 row)

Clickhouse

SELECT COUNT(DISTINCT relation_id) FROM table WHERE relation_id IN (SELECT relation_id FROM table WHERE date_from > '2019-02-01');
┌─uniqExact(report_id)─┐
│                  677 │
└──────────────────────┘

Same inconsistency if I remove the WHERE clause.
Do you have any idea what could be happening?
Thanks a lot!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions