From 4383ca431c561bf0386821b0ecdc2a116f406623 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 21 Feb 2024 17:50:06 +0800 Subject: [PATCH 1/3] query-request: add formatter for query-request.hh types before this change, we rely on the default-generated fmt::formatter created from operator<<, but fmt v10 dropped the default-generated formatter. in this change, we define formatters for following types * query::specific_ranges * query::partition_slice * query::read_command * query::forward_request * query::forward_request::reduction_type * query::forward_request::aggregation_info * query::forward_result::printer Refs #13245 Signed-off-by: Kefu Chai --- query-request.hh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/query-request.hh b/query-request.hh index bb4bc5fa30..e61442a5d2 100644 --- a/query-request.hh +++ b/query-request.hh @@ -11,6 +11,7 @@ #include #include +#include #include "db/functions/function_name.hh" #include "db/functions/function.hh" @@ -517,3 +518,12 @@ struct forward_result { std::ostream& operator<<(std::ostream& out, const query::forward_result::printer&); } + + +template <> struct fmt::formatter : fmt::ostream_formatter {}; +template <> struct fmt::formatter : fmt::ostream_formatter {}; +template <> struct fmt::formatter : fmt::ostream_formatter {}; +template <> struct fmt::formatter : fmt::ostream_formatter {}; +template <> struct fmt::formatter : fmt::ostream_formatter {}; +template <> struct fmt::formatter : fmt::ostream_formatter {}; +template <> struct fmt::formatter : fmt::ostream_formatter {}; From e5a930e7c6d8ac1840e39b2852bacfec569b7586 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 21 Feb 2024 17:54:13 +0800 Subject: [PATCH 2/3] query-result-set: add formatter for query-result-set.hh types before this change, we rely on the default-generated fmt::formatter created from operator<<, but fmt v10 dropped the default-generated formatter. in this change, we define formatters for following types * query::result_set * query::result_set_row Refs #13245 Signed-off-by: Kefu Chai --- query-result-set.hh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/query-result-set.hh b/query-result-set.hh index e7847c7126..b02ed5e5f2 100644 --- a/query-result-set.hh +++ b/query-result-set.hh @@ -10,6 +10,7 @@ #include +#include #include "types/types.hh" #include "schema/schema.hh" @@ -129,3 +130,6 @@ inline bool operator==(const result_set& x, const result_set& y) { } } + +template <> struct fmt::formatter : fmt::ostream_formatter {}; +template <> struct fmt::formatter : fmt::ostream_formatter {}; From 1263494dd1309ce98d46b7df5edc17ab662070f2 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 21 Feb 2024 17:57:11 +0800 Subject: [PATCH 3/3] query-result.hh: add formatter for query::result::printer before this change, we rely on the default-generated fmt::formatter created from operator<<, but fmt v10 dropped the default-generated formatter. in this change, we define formatters for following types * query::result::printer Refs #13245 Signed-off-by: Kefu Chai --- query-result.hh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/query-result.hh b/query-result.hh index 12c4555ba9..b97e5a6c58 100644 --- a/query-result.hh +++ b/query-result.hh @@ -13,6 +13,7 @@ #include "query-request.hh" #include "full_position.hh" #include +#include #include #include "seastarx.hh" @@ -450,3 +451,5 @@ public: std::ostream& operator<<(std::ostream& os, const query::result::printer&); } + +template <> struct fmt::formatter : fmt::ostream_formatter {};