From 62d5f98ea98f79bad07178eaf070e44e1ab211b6 Mon Sep 17 00:00:00 2001 From: Amit Dutta Date: Fri, 2 Dec 2022 13:03:02 -0800 Subject: [PATCH] [native] Minor changes in PrestoTask. --- presto-native-execution/presto_cpp/main/PrestoTask.cpp | 2 +- presto-native-execution/presto_cpp/main/types/PrestoTaskId.h | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/presto-native-execution/presto_cpp/main/PrestoTask.cpp b/presto-native-execution/presto_cpp/main/PrestoTask.cpp index 780360ba034c2..9db332cac8b6e 100644 --- a/presto-native-execution/presto_cpp/main/PrestoTask.cpp +++ b/presto-native-execution/presto_cpp/main/PrestoTask.cpp @@ -169,7 +169,7 @@ protocol::TaskStatus PrestoTask::updateStatusLocked() { VELOX_CHECK_NOT_NULL(task, "task is null when updating status") const auto taskStats = task->taskStats(); - // Presto has a Driver per split. when splits represent partitions + // Presto has a Driver per split. When splits represent partitions // of data, there is a queue of them per Task. We represent // processed/queued splits as Drivers for Presto. info.taskStatus.queuedPartitionedDrivers = taskStats.numQueuedSplits; diff --git a/presto-native-execution/presto_cpp/main/types/PrestoTaskId.h b/presto-native-execution/presto_cpp/main/types/PrestoTaskId.h index 70a1b165c9803..1dfce024dea29 100644 --- a/presto-native-execution/presto_cpp/main/types/PrestoTaskId.h +++ b/presto-native-execution/presto_cpp/main/types/PrestoTaskId.h @@ -12,7 +12,7 @@ * limitations under the License. */ #pragma once -#include +#include #include namespace facebook::presto { @@ -61,8 +61,7 @@ class PrestoTaskId { } int parseInt(const std::string& taskId, int start, int end) { - auto string = taskId.substr(start, end - start); - return atoi(string.c_str()); + return folly::to(taskId.substr(start, end - start)); } std::string queryId_;