File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff 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+ };
You can’t perform that action at this time.
0 commit comments