LucidDB / luciddb

DEFUNCT: See README
https://github.com/LucidDB/luciddb
Apache License 2.0
53 stars 24 forks source link

[FRG-15] Data type conversion fails for some null values #855

Closed dynamobi-build closed 12 years ago

dynamobi-build commented 12 years ago

[reporter="jpham", created="Fri, 6 Jan 2006 14:58:42 -0500 (GMT-05:00)"] For example, we can't cast null strings to doubles:
    values cast( cast(null as varchar(256)) as double);

See method NullablePrimitive.assignFrom
This method usually handles the casting, but it
is not smart enough to know whether Strings
(EncodedCharPointer) are null.

One approach is to check for the string data type.

A more general approach would be making
EncodedCharPointer inherit from NullablePrimitive
or NullableValue. Then handling values of the
base class.

An alternate approach would be to call the toString
method, and handle the string "null". However, this
approach has poor type safety and performance.

Finally, it might be nice to have some kind of matrix
testing for null values. We may also want to check
for null-related problems in other components,
like Fennel.

dynamobi-build commented 12 years ago

[author="xluo", created="Sun, 8 Jan 2006 13:11:28 -0500 (GMT-05:00)"] need to check NullableValue. Changelist 4991