From e65c9899f9e36c94d65c8948d6f7443d5c61a187 Mon Sep 17 00:00:00 2001 From: Niranjan Artal Date: Fri, 17 Nov 2023 15:53:14 -0800 Subject: [PATCH] address review comments --- .../spark/sql/rapids/tool/ToolUtils.scala | 20 +++++++++---------- .../qualification/QualificationAppInfo.scala | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/core/src/main/scala/org/apache/spark/sql/rapids/tool/ToolUtils.scala b/core/src/main/scala/org/apache/spark/sql/rapids/tool/ToolUtils.scala index 48cf944e3..c84261c18 100644 --- a/core/src/main/scala/org/apache/spark/sql/rapids/tool/ToolUtils.scala +++ b/core/src/main/scala/org/apache/spark/sql/rapids/tool/ToolUtils.scala @@ -318,16 +318,16 @@ object SQLMetricsStats { } object IgnoreExecs { - val AdaptiveSparkPlan = "AdaptiveSparkPlan" // AdaptiveSparkPlan is not a real exec. It is - // a wrapper for the whole plan. - val CollectLimit = "CollectLimit" // Collect Limit replacement can be slower on the - // GPU. Disabled by default. - val ScanExistingRDD = "Scan ExistingRDD" - val ExecuteCreateViewCommand = "Execute CreateViewCommand" - val ExistingRDD = "ExistingRDD" - val LocalTableScan = "LocalTableScan" - - def getallIgnoreExecs = Set(AdaptiveSparkPlan, CollectLimit, ScanExistingRDD, + // AdaptiveSparkPlan is not a real exec. It is a wrapper for the whole plan. + private val AdaptiveSparkPlan = "AdaptiveSparkPlan" + // Collect Limit replacement can be slower on the GPU. Disabled by default. + private val CollectLimit = "CollectLimit" + private val ScanExistingRDD = "Scan ExistingRDD" + private val ExecuteCreateViewCommand = "Execute CreateViewCommand" + private val ExistingRDD = "ExistingRDD" + private val LocalTableScan = "LocalTableScan" + + def getAllIgnoreExecs: Set[String] = Set(AdaptiveSparkPlan, CollectLimit, ScanExistingRDD, ExecuteCreateViewCommand, ExistingRDD, LocalTableScan) } diff --git a/core/src/main/scala/org/apache/spark/sql/rapids/tool/qualification/QualificationAppInfo.scala b/core/src/main/scala/org/apache/spark/sql/rapids/tool/qualification/QualificationAppInfo.scala index 688cda259..6847da083 100644 --- a/core/src/main/scala/org/apache/spark/sql/rapids/tool/qualification/QualificationAppInfo.scala +++ b/core/src/main/scala/org/apache/spark/sql/rapids/tool/qualification/QualificationAppInfo.scala @@ -587,7 +587,7 @@ class QualificationAppInfo( }.flatten topLevelExecs ++ childrenExecs }.collect { - case x if !IgnoreExecs.getallIgnoreExecs.contains(x.exec) => x.exec + case x if !IgnoreExecs.getAllIgnoreExecs.contains(x.exec) => x.exec }.toSet.mkString(";").trim.replaceAll("\n", "").replace(",", ":")