[improve](float) improve float and double to string - #54760
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
TPC-H: Total hot run time: 33800 ms |
fa7eb0e to
46ffbe0
Compare
|
run buildall |
TPC-H: Total hot run time: 33957 ms |
TPC-DS: Total hot run time: 184811 ms |
Possible file(s) that should be tracked in LFS detected: 🚨The following file(s) exceeds the file size limit:
Consider using |
| static std::string to_string(const void* src) { | ||
| char buf[1024] = {'\0'}; | ||
| int length = to_buffer(*reinterpret_cast<const CppType*>(src), MAX_FLOAT_STR_LENGTH, buf); | ||
| int length = fast_to_buffer(*reinterpret_cast<const CppType*>(src), buf); |
There was a problem hiding this comment.
为什么是调用这个fast_to_buffer,而不是调用CastToString
| char buf[MAX_FLOAT_STR_LENGTH + 2]; | ||
| int len = to_buffer(data, MAX_FLOAT_STR_LENGTH + 2, buf); | ||
| char buf[MAX_DOUBLE_STR_LENGTH + 2]; | ||
| int len = fast_to_buffer(data, buf); |
There was a problem hiding this comment.
这里也是,可以直接调用CastToString,这样对外的接口就比较统一了。
7b4e1d4 to
ef7512a
Compare
|
run buildall |
Possible file(s) that should be tracked in LFS detected: 🚨The following file(s) exceeds the file size limit:
Consider using |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
ef7512a to
7f05805
Compare
Possible file(s) that should be tracked in LFS detected: 🚨The following file(s) exceeds the file size limit:
Consider using |
7f05805 to
4e8a078
Compare
|
run buildall |
Possible file(s) that should be tracked in LFS detected: 🚨The following file(s) exceeds the file size limit:
Consider using |
4e8a078 to
1d2f9d5
Compare
|
run buildall |
Possible file(s) that should be tracked in LFS detected: 🚨The following file(s) exceeds the file size limit:
Consider using |
1d2f9d5 to
fcb1429
Compare
Possible file(s) that should be tracked in LFS detected: 🚨The following file(s) exceeds the file size limit:
Consider using |
|
run buildall |
TPC-H: Total hot run time: 33945 ms |
TPC-DS: Total hot run time: 185269 ms |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
2027f82 to
10dc0ca
Compare
|
run buildall |
Possible file(s) that should be tracked in LFS detected: 🚨The following file(s) exceeds the file size limit:
Consider using |
10dc0ca to
cad0601
Compare
|
run buildall |
Possible file(s) that should be tracked in LFS detected: 🚨The following file(s) exceeds the file size limit:
Consider using |
TPC-H: Total hot run time: 33926 ms |
TPC-DS: Total hot run time: 185119 ms |
ClickBench: Total hot run time: 32.79 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run external |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
Zone-map DOUBLE/FLOAT min/max were formatted with digits10+1 (16g/7g, #54760), which fails to round-trip finite extremes — ±DBL_MAX overflows to ±inf on readback, ±FLT_MAX loses precision — corrupting the zone map.
Zone-map DOUBLE/FLOAT min/max were formatted with digits10+1 (16g/7g, apache#54760), which fails to round-trip finite extremes — ±DBL_MAX overflows to ±inf on readback, ±FLT_MAX loses precision — corrupting the zone map.
### What problem does this PR solve? Related PR: apache#54760, apache#61277, apache#65302 Problem Summary: A zone map bound that fails to parse is unknown, not null -- older versions wrote DOUBLE bounds with digits10+1 precision, so DBL_MAX reads back as infinity and is rejected. Mark such a zone map pass_all so it prunes nothing, instead of failing every scan that loads it. ### Release note None Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TPTGDEAgu5sQVYYvfvyTJz
### What problem does this PR solve? Related PR: apache#54760, apache#61277, apache#65302 Problem Summary: A zone map bound that fails to parse is unknown, not null -- older versions wrote DOUBLE bounds with digits10+1 precision, so DBL_MAX reads back as infinity and is rejected. Mark such a zone map pass_all so it prunes nothing, instead of failing every scan that loads it. Pushed-down MIN/MAX falls back to a normal scan when a segment zone map turns out to be invalid. ### Release note None Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TPTGDEAgu5sQVYYvfvyTJz
### What problem does this PR solve? Related PR: apache#54760, apache#61277, apache#65302 Problem Summary: A zone map bound that fails to parse is unknown, not null -- older versions wrote DOUBLE bounds with digits10+1 precision, so DBL_MAX reads back as infinity and is rejected. Mark such a zone map pass_all so it prunes nothing, instead of failing every scan that loads it. Pushed-down MIN/MAX falls back to a normal scan when a segment zone map turns out to be invalid. ### Release note None Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TPTGDEAgu5sQVYYvfvyTJz
### What problem does this PR solve? Related PR: apache#54760, apache#61277, apache#65302 Problem Summary: A zone map bound that fails to parse is unknown, not null -- older versions wrote DOUBLE bounds with digits10+1 precision, so DBL_MAX reads back as infinity and is rejected. Mark such a zone map pass_all so it prunes nothing, instead of failing every scan that loads it. Pushed-down MIN/MAX falls back to a normal scan when a segment zone map turns out to be invalid. ### Release note None Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TPTGDEAgu5sQVYYvfvyTJz
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)