Skip to content

Commit

Permalink
Make duplicate scan debug log be info. (NVIDIA#15)
Browse files Browse the repository at this point in the history
log as info

Signed-off-by: Firestarman <[email protected]>
  • Loading branch information
firestarman authored Dec 14, 2023
1 parent 0ade956 commit e99c1b9
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand All @@ -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})
Expand All @@ -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
Expand All @@ -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
}
Expand Down

0 comments on commit e99c1b9

Please sign in to comment.