From 7df715557c6b11aafdf01bf2aa062f0f00dd6a7e Mon Sep 17 00:00:00 2001 From: Jialiang Tan Date: Fri, 26 Jan 2024 14:30:49 -0800 Subject: [PATCH] Deprecate toJonString() methods (#8543) Summary: Pull Request resolved: https://github.com/facebookincubator/velox/pull/8543 Reviewed By: xiaoxmeng Differential Revision: D53110267 Pulled By: tanjialiang fbshipit-source-id: f4354d376e874c1533142008c02b73ec0a2b2879 --- velox/exec/ExchangeSource.h | 11 ----------- velox/exec/Task.cpp | 10 ---------- velox/exec/Task.h | 4 ---- 3 files changed, 25 deletions(-) diff --git a/velox/exec/ExchangeSource.h b/velox/exec/ExchangeSource.h index e2a199ee57a8..452c8ded9f42 100644 --- a/velox/exec/ExchangeSource.h +++ b/velox/exec/ExchangeSource.h @@ -130,17 +130,6 @@ class ExchangeSource : public std::enable_shared_from_this { return obj; } - // TODO(jtan6): Remove after presto native toJson implementation - virtual std::string toJsonString() { - folly::dynamic obj = folly::dynamic::object; - obj["taskId"] = taskId_; - obj["destination"] = destination_; - obj["sequence"] = sequence_; - obj["requestPending"] = requestPending_.load(); - obj["atEnd"] = atEnd_; - return folly::toPrettyJson(obj); - } - using Factory = std::function( const std::string& taskId, int destination, diff --git a/velox/exec/Task.cpp b/velox/exec/Task.cpp index 7f190247abfa..f6134c941014 100644 --- a/velox/exec/Task.cpp +++ b/velox/exec/Task.cpp @@ -2112,16 +2112,6 @@ std::string Task::toString() const { return out.str(); } -// TODO(jtan6): remove after toJson() is landed on presto native side -std::string Task::toShortJsonString() const { - return folly::toPrettyJson(toShortJson()); -} - -// TODO(jtan6): remove after toJson() is landed on presto native side -std::string Task::toJsonString() const { - return folly::toPrettyJson(toJson()); -} - folly::dynamic Task::toShortJsonLocked() const { folly::dynamic obj = folly::dynamic::object; obj["shortId"] = shortId(taskId_); diff --git a/velox/exec/Task.h b/velox/exec/Task.h index b4f945a71374..6d3ec629fe94 100644 --- a/velox/exec/Task.h +++ b/velox/exec/Task.h @@ -79,10 +79,6 @@ class Task : public std::enable_shared_from_this { std::string toString() const; - std::string toJsonString() const; - - std::string toShortJsonString() const; - folly::dynamic toJson() const; folly::dynamic toShortJson() const;