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

Boolean expressions in WHERE clause, result in incorrect resulsts #3412

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

Comments

@monetdb-team
Copy link

Date: 2013-12-12 21:30:29 +0100
From: ittaibalaban
To: SQL devs <>
Version: 11.15.19 (Feb2013-SP6)
CC: @njnes

Last updated: 2014-02-20 15:02:35 +0100

Comment 19419

Date: 2013-12-12 21:30:29 +0100
From: ittaibalaban

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36
Build Identifier:

Given a boolean column X, using a WHERE clause of the form "X and " seems to cause to not be evaluated, whereas "X = true and " is evaluated correctly.

Reproducible: Always

Steps to Reproduce:

  1. create table boolean_test (b boolean not null, i int not null);
  2. insert into boolean_test (b, i) values (true, 1), (true, 2), (true, 3), (true, 4);
  3. select * from boolean_test where b and (i < 3)

Actual Results:

All 4 rows are returned.

Expected Results:

Only 2 rows should be returned, with i in (1,2)

The rewritten query "select * from boolean_test where b = true and (i < 3)" is evaluated correctly.

Comment 19423

Date: 2013-12-13 15:24:28 +0100
From: @njnes

handle single 'boolean' column expressions properly

Comment 19427

Date: 2013-12-13 16:08:45 +0100
From: MonetDB Mercurial Repository <>

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

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

Changeset description:

added tests for bugs 3411 and 3412

Comment 19600

Date: 2014-02-20 15:02:35 +0100
From: @sjoerdmullender

Jan2014 has been released.

@monetdb-team monetdb-team added bug Something isn't working major 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 major SQL
Projects
None yet
Development

No branches or pull requests

2 participants