Skip to content

Conversation

@JoshRosen
Copy link
Contributor

This patch fixes a bug which caused spark-redshift to throw NumberFormatException when reading NaN or Infinity from Redshift.

This patch fixes the bug by adding special-case handling of the string constants nan, inf, and -inf, which are the values sent back by Redshift during unloads. Note that we still do not support loads of NaN to Redshift since Redshift itself does not seem to support this yet (https://forums.aws.amazon.com/thread.jspa?threadID=236367).

Fixes #261.

@JoshRosen JoshRosen added the bug label Sep 20, 2016
@JoshRosen JoshRosen added this to the 2.0.2 milestone Sep 20, 2016
@codecov-io
Copy link

codecov-io commented Sep 20, 2016

Current coverage is 89.44% (diff: 100%)

Merging #269 into master will increase coverage by 0.09%

@@             master       #269   diff @@
==========================================
  Files            12         12          
  Lines           648        654     +6   
  Methods         557        526    -31   
  Messages          0          0          
  Branches         91        128    +37   
==========================================
+ Hits            579        585     +6   
  Misses           69         69          
  Partials          0          0          

Powered by Codecov. Last update f256b68...076d197

@JoshRosen JoshRosen closed this in 1873ab7 Sep 21, 2016
@JoshRosen JoshRosen deleted the fix-nan branch September 21, 2016 21:55
JoshRosen added a commit that referenced this pull request Sep 21, 2016
This patch fixes a bug which caused `spark-redshift` to throw `NumberFormatException` when reading NaN or Infinity from Redshift.

This patch fixes the bug by adding special-case handling of the string constants `nan`, `inf`, and `-inf`, which are the values sent back by Redshift during unloads. Note that we still do not support loads of `NaN` to Redshift since Redshift itself does not seem to support this yet (https://forums.aws.amazon.com/thread.jspa?threadID=236367).

Fixes #261.

Author: Josh Rosen <joshrosen@databricks.com>

Closes #269 from JoshRosen/fix-nan.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NumberFormatException when reading NaN value

3 participants