Skip to content

Commit

Permalink
Deprecate toJonString() methods (#8543)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: #8543

Reviewed By: xiaoxmeng

Differential Revision: D53110267

Pulled By: tanjialiang

fbshipit-source-id: f4354d376e874c1533142008c02b73ec0a2b2879
  • Loading branch information
tanjialiang authored and facebook-github-bot committed Jan 26, 2024
1 parent 860e35b commit 7df7155
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 25 deletions.
11 changes: 0 additions & 11 deletions velox/exec/ExchangeSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,17 +130,6 @@ class ExchangeSource : public std::enable_shared_from_this<ExchangeSource> {
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<std::shared_ptr<ExchangeSource>(
const std::string& taskId,
int destination,
Expand Down
10 changes: 0 additions & 10 deletions velox/exec/Task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_);
Expand Down
4 changes: 0 additions & 4 deletions velox/exec/Task.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,6 @@ class Task : public std::enable_shared_from_this<Task> {

std::string toString() const;

std::string toJsonString() const;

std::string toShortJsonString() const;

folly::dynamic toJson() const;

folly::dynamic toShortJson() const;
Expand Down

0 comments on commit 7df7155

Please sign in to comment.