morningman opened a new pull request, #70798: URL: https://github.com/apache/doris/pull/70798
### Background `compressed_rowid_map_test.cpp` (added by #70350) prints its benchmark numbers with `printf`. The BE unit tests are compiled with `-Werror`, including `-Wformat`. ### What problem does this PR solve? Issue Number: None Related PR: #70350 (added the test) PR Type: Test Problem Summary: On macOS, `run-be-ut.sh` stops at this file: two `printf` calls print `uint64_t` / `int64_t` values with `%lu` / `%ld`, and there these types are `unsigned long long` / `long long`, so `-Werror,-Wformat` rejects 13 arguments and the whole `doris_be_test` build fails. Linux, where the types are `unsigned long` / `long`, and the macOS CI job, which builds only `be/src`, do not notice. The formats now use `PRIu64` / `PRId64`. ### Details - **Failure:** `compressed_rowid_map_test.cpp:557:71: error: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]`, and 12 more like it, when building the BE unit tests on macOS. - **Cause:** `%lu` / `%ld` are fixed to `long`, which is 64 bits wide on both platforms but a different type from `uint64_t` / `int64_t` on macOS. - **Stability evidence:** On macOS (arm64, ASAN) `doris_be_test` builds and the 14 cases of this file pass; the benchmark lines print every field, for example `ROWID_LARGE_BENCH ... output_rows=15099748 ... checksum=114001187281878`, the value the test asserts. On Linux the macros expand to the `lu` / `ld` the file used before, so its text is unchanged there. ### Testing - `run-be-ut.sh --run --filter='CompressedRowIdMapTest.*:CompressedRowIdMapBenchmark.*'` on macOS (arm64, ASAN): without the change the build stops at this file with 13 `-Wformat` errors; with it, 14 tests pass. ### Release note None ### Check List (For Author) - Behavior changed: No - Does this need documentation: No - Pre-submission status: Ready ### AI Disclosure - Tool: Claude Code (Claude Opus 5.5) - Generated: this change and this description - Human review: not stated -- 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]
