dynamobi/dynamobi — Issue #855: [FRG-15] Data type conversion fails for some null values
Author: dynamobi-build
Created: 2011-12-30 03:53:11+00:00
State: open
Labels: FRG, Java Calc Codegen

[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.