From e99c1b9db69aabf209e84017438644d062116ea8 Mon Sep 17 00:00:00 2001 From: Liangcai Li Date: Thu, 14 Dec 2023 14:53:24 +0800 Subject: [PATCH] Make duplicate scan debug log be info. (#15) log as info Signed-off-by: Firestarman --- .../com/nvidia/spark/rapids/GpuOverrides.scala | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuOverrides.scala b/sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuOverrides.scala index c56a7c9a704..26fb200b34d 100644 --- a/sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuOverrides.scala +++ b/sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuOverrides.scala @@ -4513,12 +4513,12 @@ case class GpuOverrides() extends Rule[SparkPlan] with Logging { private def lookAtReusedExchange(sparkPlan: SparkPlan): Unit = { val exchanges = mutable.Map.empty[SparkPlan, Exchange] - println(s"==>REUSED_EX_DEBUG: reuse exchange enabled ?= ${conf.exchangeReuseEnabled}") + logInfo(s"==>REUSED_EX_DEBUG: reuse exchange enabled ?= ${conf.exchangeReuseEnabled}") sparkPlan.foreach { case exchange: Exchange => val cachedExchange = exchanges.getOrElseUpdate(exchange.canonicalized, exchange) if (cachedExchange.ne(exchange)) { - println( + logInfo( s"""==>REUSED_EX_DEBUG: found an exchange: | $exchange | (Canonicalized: ${exchange.canonicalized}) @@ -4531,9 +4531,9 @@ case class GpuOverrides() extends Rule[SparkPlan] with Logging { // found maybe a different exchange. For this case, we only care about the // 4 leaf ones. if (cachedExchange.child.find(f=>f.isInstanceOf[Exchange]).isDefined) { - println("==>REUSED_EX_DEBUG: ignore this exchange, it is not the leaf one") + logInfo("==>REUSED_EX_DEBUG: ignore this exchange, it is not the leaf one") } else { - println( + logInfo( s"""==>REUSED_EX_DEBUG: found maybe a different exchange: | $cachedExchange | (Canonicalized: ${cachedExchange.canonicalized}) @@ -4544,8 +4544,8 @@ case class GpuOverrides() extends Rule[SparkPlan] with Logging { } } case re: ReusedExchangeExec => - println(s"==>REUSED_EX_DEBUG: catch a ReusedExchangeExec, its child is: ") - println( + logInfo(s"==>REUSED_EX_DEBUG: catch a ReusedExchangeExec, its child is: ") + logInfo( s""" | ${re.child} | ===> child canonicalized @@ -4569,7 +4569,7 @@ case class GpuOverrides() extends Rule[SparkPlan] with Logging { logWarning(s"${logPrefix}Transformed query:" + s"\nOriginal Plan:\n$plan\nTransformed Plan:\n$updatedPlan") } - println("==>REUSED_EX_DEBUG: Start to look at reused exchange...") + logInfo("==>REUSED_EX_DEBUG: Start to look at reused exchange...") lookAtReusedExchange(updatedPlan) updatedPlan }