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

IntColumn.asDoubleColumn() does not convert missing values #577

Closed
albalkum opened this issue Aug 7, 2019 · 1 comment
Closed

IntColumn.asDoubleColumn() does not convert missing values #577

albalkum opened this issue Aug 7, 2019 · 1 comment

Comments

@albalkum
Copy link
Contributor

albalkum commented Aug 7, 2019

If I have an IntColumn and try to convert it to a DoubleColumn with asDoubleColumn(), all missing values are instead converted to a double representation of Integer.MIN_VALUE. Example:

IntColumn intColumn = IntColumn.create("intColumn");
intColumn.append(1);
intColumn.appendMissing();
System.out.println(intColumn.asList());		    
System.out.println(intColumn.asDoubleColumn().asList());

Output:

[1, null]
[1.0, -2.147483648E9]

Is this the intended output? I'd prefer that the null values would carry thru to the converted column. The documentation in IntColumn says "A missing value in the receiver is converted to a missing value in the result"...

Thanks!

lwhite1 added a commit that referenced this issue Aug 7, 2019
@lwhite1
Copy link
Collaborator

lwhite1 commented Aug 7, 2019

fixed.
Thanks for the bug report, @albalkum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants