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

quantile() and median() commands crash when used 2x on the same variable on a null table #3611

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

Comments

@monetdb-team
Copy link

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

Date: 2014-10-31 11:14:17 +0100
From: Anthony Damico <>
To: SQL devs <>
Version: 11.17.21 (Jan2014-SP3)
CC: ajdamico, @hannesmuehleisen

Last updated: 2014-11-28 10:03:21 +0100

Comment 20324

Date: 2014-10-31 11:14:17 +0100
From: Anthony Damico <>

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0
Build Identifier:

command breaks where it shouldn't

Reproducible: Always

Steps to Reproduce:

CREATE TABLE tempa ( one double , two integer ) ;
INSERT INTO tempa VALUES ( 1.0 , 1 ) , ( 2.0 , 2 ) ;
SELECT quantile( one , 0.25 ) , quantile( one , 0.5 ) FROM tempa WHERE two > 2 ;

Actual Results:

sql>CREATE TABLE tempa ( one double , two integer ) ;
operation successful (78.651ms)
sql>INSERT INTO tempa VALUES ( 1.0 , 1 ) , ( 2.0 , 2 ) ;
2 affected row (15.009ms)
sql>SELECT quantile( one , 0.25 ) , quantile( one , 0.5 ) FROM tempa WHERE two >
2 ;
quantile value of -1797693134862315700000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000 is not in range [0,1]
sql>

Expected Results:

two columns with zero records or missing values? not this.

Comment 20325

Date: 2014-10-31 11:33:53 +0100
From: MonetDB Mercurial Repository <>

Changeset 849b925afb3d made by Hannes Muehleisen hannes@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=849b925afb3d

Changeset description:

Test for Bug #3611

Comment 20326

Date: 2014-10-31 11:34:08 +0100
From: @hannesmuehleisen

confirmed in default

Comment 20406

Date: 2014-10-31 15:41:01 +0100
From: MonetDB Mercurial Repository <>

Changeset 957ab8b84580 made by Hannes Muehleisen hannes@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=957ab8b84580

Changeset description:

Test for Bug #3611
(grafted from 849b925afb3d3dd3f2f7a0da84cf4115fc43e5ac)

Comment 20407

Date: 2014-10-31 15:41:05 +0100
From: MonetDB Mercurial Repository <>

Changeset a3da268f796f made by Sjoerd Mullender sjoerd@acm.org in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a3da268f796f

Changeset description:

Fix for bug #3611.
If the main bat is empty, the quantile bat may also be empty.  In that
case, just use 0.5 as quantile value so that we get a result with a
nil value.

Comment 20472

Date: 2014-11-28 10:03:21 +0100
From: @sjoerdmullender

Oct2014-SP1 has been released.

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