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: Wrong output in aggregation query #6510

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

Sqlitelogictest: Wrong output in aggregation query #6510

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

Comments

@monetdb-team
Copy link

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

Date: 2018-01-12 12:58:33 +0100
From: @PedroTadim
To: SQL devs <>
Version: -- development
CC: @njnes

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

Comment 26069

Date: 2018-01-12 12:58:33 +0100
From: @PedroTadim

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

MonetDB gives wrong results in a product of two count aggregation calls from an intermediate relation with no tuples.

Reproducible: Always

Steps to Reproduce:

  1. CREATE TABLE tab1(col0 INTEGER, col1 INTEGER, col2 INTEGER);
  2. INSERT INTO tab1 VALUES(51,14,96);
  3. INSERT INTO tab1 VALUES(85,5,59);
  4. INSERT INTO tab1 VALUES(91,47,68);
  5. SELECT ALL COUNT ( DISTINCT - 34 ) * - COUNT ( * ) AS col2 FROM tab1 WHERE + col1 IS NULL;

Actual Results:

A single atom in the result set with value NULL.

Expected Results:

A single atom in the result set with value 0.

Comment 26070

Date: 2018-01-12 13:05:42 +0100
From: MonetDB Mercurial Repository <>

Changeset 3d050eebe253 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=3d050eebe253

Changeset description:

Added test for bug #6510

Comment 26087

Date: 2018-01-18 08:02:48 +0100
From: @njnes

handle partial count/sum where count results are empty

Comment 26094

Date: 2018-01-18 08:08:08 +0100
From: MonetDB Mercurial Repository <>

Changeset 248aa8f21695 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=248aa8f21695

Changeset description:

Fixes for bugs 6510, 6512, 6514 and 6515

6510 start sum's at 0 instead of nil in case of count/sum 2 step aggregation
6512 make sure we only call bat.single on constants (ie not on bats).
6514 handle NULL (type void) on both sides of an compare operator, ie cast to a valid type.
6515 handle null in calc.second_interval
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