Skip to content

Commit 94bd533

Browse files
Krishna Paifacebook-github-bot
authored andcommitted
fix: Fix broken build
Summary: Fix for fmt 11 complaining about IExpr. Differential Revision: D88090450
1 parent 33f740e commit 94bd533

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

velox/parse/IExpr.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,3 +165,23 @@ struct IExprEqual {
165165
};
166166

167167
} // namespace facebook::velox::core
168+
169+
template <>
170+
struct fmt::formatter<facebook::velox::core::IExpr>
171+
: fmt::formatter<std::string> {
172+
auto format(const facebook::velox::core::IExpr& expr, format_context& ctx)
173+
const {
174+
return fmt::formatter<std::string>::format(expr.toString(), ctx);
175+
}
176+
};
177+
178+
// For ExprPtr (shared_ptr)
179+
template <>
180+
struct fmt::formatter<facebook::velox::core::ExprPtr>
181+
: fmt::formatter<std::string> {
182+
auto format(const facebook::velox::core::ExprPtr& expr, format_context& ctx)
183+
const {
184+
return fmt::formatter<std::string>::format(
185+
expr ? expr->toString() : "null", ctx);
186+
}
187+
};

0 commit comments

Comments
 (0)