EscaperLL opened a new pull request, #69647: URL: https://github.com/apache/doris/pull/69647
### What problem does this PR solve? Issue Number: N/A Problem Summary: Parquet FLOAT16 conversion calls `std::powf(2.0F, -14.0F)`. Older libstdc++ headers do not expose `powf` in namespace `std`, causing BE compilation to fail even with toolchains accepted by Doris. This is reproducible with GCC 12.3 and Clang 22.1.8 using their default libstdc++ configurations. Include `<cmath>` explicitly and use `std::pow` with float arguments. The selected overload returns float and preserves the existing conversion semantics. GCC added the missing namespace declarations in [PR79700](https://gcc.gnu.org/pipermail/gcc-bugs/2023-November/841727.html). ### Release note Fix BE compilation for Parquet FLOAT16 conversion with older libstdc++. ### Check List (For Author) - Test - [ ] Regression test - [x] Unit Test - [x] Manual test (add detailed scripts or steps below) - [ ] No need to test or manual test. Explain why: Validation was performed on the original fix before cherry-picking onto master: - `BUILD_TYPE_UT=ASAN ./run-be-ut.sh --run --filter='ParquetColumnConvertTest.*' -j8`: all 14 tests passed. This suite does not directly cover FLOAT16. - C++20 syntax checks reproduced the original failure and verified the replacement with GCC 12.3 and Clang 22.1.8; static assertions confirmed a float return type. Clang with libc++ also passed syntax and return-type checks. - The extracted conversion matched a `::powf` baseline bit-for-bit for all 65,536 FLOAT16 patterns on both compilers at `-O0` and `-O2`; all subnormal values also matched an independent exact reference. - clang-format 16, build hygiene, clang-tidy, and diff whitespace checks passed. - ASAN BE compilation and linking completed, but the overall build failed the glibc 2.17 compatibility gate and dictionary generation could not locate `libomp.so`. The linked `powf` requirement is `GLIBC_2.2.5`; this does not establish full artifact compatibility. - The HDFS FLOAT16 regression suite was not run because an external Hive/HDFS environment was unavailable. - Behavior changed: - [x] No. - [ ] Yes. - Does this need documentation? - [x] No. - [ ] Yes. ### Check List (For Reviewer who merge this PR) - [ ] Confirm the release note - [ ] Confirm test cases - [ ] Confirm document - [ ] Add branch pick label -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
