Skip to content

Not seeing a NaN when expected on initial import #377

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

Closed
tfmorris opened this issue Oct 15, 2012 · 6 comments · Fixed by #4689
Closed

Not seeing a NaN when expected on initial import #377

tfmorris opened this issue Oct 15, 2012 · 6 comments · Fixed by #4689
Assignees
Labels
grel The default expression language, GREL, could be improved in many ways! import About importers in general - add a label for the data format if available imported from old code repo Issue imported from Google Code in 2010 Priority: Medium Represents important issues that need to be addressed but are not urgent Type: Bug Issues related to software defects or unexpected behavior, which require resolution.

Comments

@tfmorris
Copy link
Member

tfmorris commented Oct 15, 2012

Original author: PaulMake...@gmail.com (May 10, 2011 17:48:18)

What steps will reproduce the problem?

  1. Import the attached file (containing simply the number 0 and a header)
  2. Edit cells -> Transform: value / value

What is the expected output? What do you see instead?

Expect to see NaN - see instead null.

What version of Google Refine are you using?

2.0

What operating system and browser are you using?

Windows Chrome

Please provide any additional information below.

If I transform the column to text and then back to numbers I get the expected NaN as though the initial import missed something in construction.

Original issue: http://code.google.com/p/google-refine/issues/detail?id=377

@tfmorris
Copy link
Member Author

From dfhu...@gmail.com on May 10, 2011 20:59:12:
Paul, in the Transform dialog box, at the bottom, what choice did you specify for "On error"?

@tfmorris
Copy link
Member Author

From PaulMake...@gmail.com on May 10, 2011 21:22:24:
I'm actually looking at the value in the preview pane, even before submitting it.

Interestingly, when submitting it, I see "Text transform on 0 cells in column number: grel:value/value" -- it's not applied to that cell. (This happens regardless of the "On error" setting.)

I can induce a NaN to appear with value.toString().toNumber()/value

@tfmorris
Copy link
Member Author

From dfhu...@gmail.com on May 12, 2011 17:48:37:
I'm seeing an exception thrown, too.

@wetneb wetneb added the import About importers in general - add a label for the data format if available label Aug 2, 2017
@wetneb wetneb added the grel The default expression language, GREL, could be improved in many ways! label Dec 20, 2019
@wetneb
Copy link
Member

wetneb commented Dec 20, 2019

To rephrase this issue: 0 / 0 should evaluate to NaN in GREL.

@thadguidry
Copy link
Member

It's really nice to see this issue finally closed after all these years. It pops up for me every now and again. So, many thanks @elroykanye for fixing this.

@elroykanye
Copy link
Member

It's really nice to see this issue finally closed after all these years. It pops up for me every now and again. So, many thanks @elroykanye for fixing this.

😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
grel The default expression language, GREL, could be improved in many ways! import About importers in general - add a label for the data format if available imported from old code repo Issue imported from Google Code in 2010 Priority: Medium Represents important issues that need to be addressed but are not urgent Type: Bug Issues related to software defects or unexpected behavior, which require resolution.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants