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

NULL cannot automatically be casted to every other type #2594

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

NULL cannot automatically be casted to every other type #2594

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

Comments

@monetdb-team
Copy link

Date: 2010-07-07 15:29:53 +0200
From: @grobian
To: SQL devs <>
Version: 11.9.5 (Apr2012-SP1) [obsolete]
CC: charnik, @njnes

Last updated: 2012-06-19 11:20:12 +0200

Comment 14252

Date: 2010-07-07 15:29:53 +0200
From: @grobian

create table skyboom (i int, ts timestamp);

select i as boom1, ts as boom2 from skyboom
union
select NULL as boom1, NULL as boom2;

The result is:
types char(0,0) boom1(str) and int(32,0) (int) are not equal

and if we could do an explicit CAST(NULL AS int) instead, it would complain about boom2.

This is a generic problem, as NULL gets typed as char, while it should be casted to any type required, unless explicitly casted to a type. Perhaps a NULL type is required.

Comment 14841

Date: 2010-08-30 09:23:20 +0200
From: @sjoerdmullender

The Jun2010-SP2 version has been released.

Comment 15683

Date: 2011-03-28 17:36:31 +0200
From: @sjoerdmullender

The Mar2011 version has been released.

Comment 16035

Date: 2011-07-29 11:00:03 +0200
From: @sjoerdmullender

Apr2011-SP2 has been released.

Comment 16273

Date: 2011-09-16 15:10:38 +0200
From: @sjoerdmullender

The Aug2011 version has been released.

Comment 17261

Date: 2012-05-16 22:49:31 +0200
From: @njnes

Changeset 3012edaf1396 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=3012edaf1396

Changeset description:

added test for bug #2594

Comment 17262

Date: 2012-05-16 22:51:14 +0200
From: @njnes

implemented default NULL as type ANY.

@monetdb-team monetdb-team added bug Something isn't working normal SQL labels Nov 30, 2020
@sjoerdmullender sjoerdmullender added this to the Ancient Release milestone Nov 9, 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 normal SQL
Projects
None yet
Development

No branches or pull requests

2 participants