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: Range query between NULL values not possible #6514

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

Sqlitelogictest: Range query between NULL values not possible #6514

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-12 15:04:44 +0100
From: @PedroTadim
To: SQL devs <>
Version: -- development
CC: @njnes

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

Comment 26078

Date: 2018-01-12 15:04:44 +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:

A select query between ranges of two NULL values results in a type exception. MonetDB should do the comparison using other type than "void".

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 col1 FROM tab1 WHERE NULL <= NULL;

Actual Results:

The followin type exception:
TypeException:user.s6_1[16]:'calc.<=' undefined in: X_26:bit := calc.<=(X_24:void, X_25:void);

Expected Results:

An empty result set.

Other sqlitelogictests are following for other predicate algebra operators: >=, <, >, ==, !=

Comment 26080

Date: 2018-01-12 15:12:44 +0100
From: MonetDB Mercurial Repository <>

Changeset 9a05add39d7b 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=9a05add39d7b

Changeset description:

Added tests for bugs 6513 and 6514

Comment 26089

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

handle NULL (type void) on both sides of an compare operator, ie cast to a valid type.

Comment 26092

Date: 2018-01-18 08:08:05 +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