bug in cell splitter if guess column type is used

Hi

If I use “guess size and column types” with the cell splitter node, it treats an entry of 300D as a double, dropping the “D” character, instead of returning a string 300D. It does not do the same if I use another character for “D”, or append other alphanumeric characters after the D. The character F has the same effect.

Incidentally, column auto type cast node also has the same behaviour.

Looks somehow D (or F) are designator for double?

I have a screen shot of the input, configuration, output, and attached workflow.

Would be nice to have a way to guess size without converting column types, and to have documentation of the column type conversion. I can’t find any note on this in the node description either for the Cell Splitter or for the Column Auto Type Cast.

bug with cell splitter.knwf (10.3 KB)

1 Like

Hi David,

thank you for your detailed bug report and the attached workflow!

I will create a bug ticket!

Thanks,
Kathrin

1 Like

D and F are indicators in java for double (double precision floating point) and float (single precision floating point). You may well find that ‘L’ results in a Long integer too. Maybe this should be an option to treat these characters as such or ignore them?

There are a few other characters which might also be interpreted as part of numerals - see https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html (e.g. ‘_’)

Steve

1 Like

Thanks, I figure it might be that. However, this creates difficulty if this is always presumed, such as in the case I had.

Having the option to treat the cells as literal would be a good enhancement, and possibly also have the choice to accept type suffix or not, such as in the String to Number node.

Best

David

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.