File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
presto-native-execution/presto_cpp/main Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,14 @@ std::string getConnectorCacheStats(proxygen::HTTPMessage* message) {
6868 VELOX_USER_FAIL (" connector '{}' operation is not supported" , name);
6969}
7070
71+ std::string prettyJson (folly::dynamic const & dyn) {
72+ folly::json::serialization_opts opts;
73+ opts.pretty_formatting = true ;
74+ opts.sort_keys = true ;
75+ opts.convert_int_keys = true ;
76+ return folly::json::serialize (dyn, opts);
77+ }
78+
7179} // namespace
7280
7381void PrestoServerOperations::runOperation (
@@ -205,7 +213,7 @@ std::string PrestoServerOperations::taskOperation(
205213 if (task == taskMap.end ()) {
206214 return fmt::format (" No task found with id {}" , id);
207215 }
208- return folly::toPrettyJson (task->second ->toJson ());
216+ return prettyJson (task->second ->toJson ());
209217 }
210218 case ServerOperation::Action::kListAll : {
211219 uint32_t limit;
@@ -233,7 +241,7 @@ std::string PrestoServerOperations::taskOperation(
233241 break ;
234242 }
235243 }
236- oss << folly::toPrettyJson (arrayObj);
244+ oss << prettyJson (arrayObj);
237245 return oss.str ();
238246 }
239247 default :
You can’t perform that action at this time.
0 commit comments