Commit 9ba0cc78 authored by zhangjin's avatar zhangjin Committed by Guolin Ke
Browse files

add 'null' to missing value (#1064)

add 'null' to missing value
parent e5eb8560
......@@ -248,7 +248,8 @@ inline static const char* Atof(const char* p, double* out) {
if (cnt > 0) {
std::string tmp_str(p, cnt);
std::transform(tmp_str.begin(), tmp_str.end(), tmp_str.begin(), Common::tolower);
if (tmp_str == std::string("na") || tmp_str == std::string("nan")) {
if (tmp_str == std::string("na") || tmp_str == std::string("nan") ||
tmp_str == std::string("null")) {
*out = NAN;
} else if (tmp_str == std::string("inf") || tmp_str == std::string("infinity")) {
*out = sign * 1e308;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment