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

Insert null second interval value results in 0 #6515

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

Insert null second interval value results in 0 #6515

monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels
bug Something isn't working minor SQL

Comments

@monetdb-team
Copy link

Date: 2018-01-16 17:59:34 +0100
From: @PedroTadim
To: SQL devs <>
Version: -- development
CC: @njnes

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

Comment 26084

Date: 2018-01-16 17:59:34 +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:

Inserting a second interval value in a table results in a 0 value instead of NULL.

This happened in MonetDBLite-Java tests (after the merge) and it's happening as well in the latest development version of Jul2017 branch. (I am looking into this as well)

Reproducible: Always

Steps to Reproduce:

  1. CREATE TABLE testnullsb (g INTERVAL minute to second);
  2. INSERT INTO testnullsb VALUES (NULL);
  3. SELECT g FROM testnullsb;

Actual Results:

0 value

Expected Results:

NULL value

Comment 26085

Date: 2018-01-16 18:21:39 +0100
From: @PedroTadim

From hg bisect, the commit 64922:b1efe52241ae created the bug.

Comment 26086

Date: 2018-01-17 10:51:50 +0100
From: MonetDB Mercurial Repository <>

Changeset 4b923b30c82c 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=4b923b30c82c

Changeset description:

Added test for bug #6515

Comment 26090

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

handle null in calc.second_interval

Comment 26093

Date: 2018-01-18 08:08:07 +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
@monetdb-team monetdb-team added bug Something isn't working minor SQL labels Nov 30, 2020
@sjoerdmullender sjoerdmullender added this to the Ancient Release milestone Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working minor SQL
Projects
None yet
Development

No branches or pull requests

2 participants