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

Incorrect aggregation result when grouping by PostgreSQL TIME in presence of 24:00:00 values #5339

Open
findepi opened this issue Sep 29, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@findepi
Copy link
Member

findepi commented Sep 29, 2020

PostgreSQL

CREATE TABLE t(a time(3));
INSERT INTO t VALUES (TIME '23:59:59.999');
INSERT INTO t VALUES (TIME '24:00:00.000');

Presto

presto:tpch> SELECT a FROM t;
      a
--------------
 23:59:59.999
 23:59:59.999

but:

presto:tpch> SELECT count(*) FROM t GROUP BY a;
 _col0
-------
     1
     1

while same with aggregation pushdown disabled

presto:tpch> SET SESSION postgresql.allow_aggregation_pushdown = false;
SET SESSION
presto:tpch> SELECT count(*) FROM t GROUP BY a;
 _col0
-------
     2
@findepi findepi added the bug Something isn't working label Sep 29, 2020
@findepi findepi mentioned this issue Jan 15, 2021
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant