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

DX-61115 handle + sign during parsing +infinity double value #31

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cpp/src/arrow/vendored/fast_float/parse_number.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ from_chars_result parse_infnan(const char *first, const char *last, T &value) n
minusSign = true;
++first;
}
if (*first == '+') {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment at line 29 "C++17 20.19.3.(7.1) explicitly forbids '+' here" seems to be outdated

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not really, in fast_float version of 3.10.1( current is 3.8.1) https://github.com/fastfloat/fast_float/blob/main/include/fast_float/parse_number.h

was added

#ifdef FASTFLOAT_ALLOWS_LEADING_PLUS // disabled by default
  if (*first == UC('+')) {
      ++first;
  }

I created pr in apache arrow for updating fast_float version but i don't know when it will merged or will it be merged at all. So for now we could use this.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and i don't want to remove any comments because it's a custom lib, and will be conflict on merging

++first;
}
if (last - first >= 3) {
if (fastfloat_strncasecmp(first, "nan", 3)) {
answer.ptr = (first += 3);
Expand Down