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

Sqlitelogictest - Aggregation query on empty table with DISTINCT clause #6493

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

Comments

@monetdb-team
Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2017-12-13 11:34:54 +0100
From: @PedroTadim
To: SQL devs <>
Version: -- development
CC: @njnes

Last updated: 2018-02-12 16:12:14 +0100

Comment 25998

Date: 2017-12-13 11:34:54 +0100
From: @PedroTadim

User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36
Build Identifier:

Doing a minimum aggregation query with a distinct clause on a constant from an empty table should return NULL instead of the constant.

Reproducible: Always

Steps to Reproduce:

  1. CREATE TABLE tab0(pk INTEGER PRIMARY KEY, col0 INTEGER, col1 FLOAT, col2 TEXT, col3 INTEGER, col4 FLOAT, col5 TEXT);
  2. SELECT - MIN ( DISTINCT + 79 ) FROM tab0 AS cor0 WHERE NOT + col4 IS NOT NULL;

Actual Results:

-79

Expected Results:

NULL

Comment 25999

Date: 2017-12-13 12:07:40 +0100
From: MonetDB Mercurial Repository <>

Changeset 743945dfef8d made by Pedro Ferreira pedro.ferreira@monetdbsolutions.com in the MonetDB repo, refers to this bug.

For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=743945dfef8d

Changeset description:

Added test for Bug #6493

Comment 26021

Date: 2017-12-17 11:11:16 +0100
From: @njnes

fixed with same fix as for bug #6496, ie don't over reduce the groupby list

Comment 26023

Date: 2017-12-17 11:12:30 +0100
From: MonetDB Mercurial Repository <>

Changeset ecafd37b7cb4 made by Niels Nes niels@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=ecafd37b7cb4

Changeset description:

fixed bugs 6496 and 6493, don't over reduce the number of group by expressions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant