From eb919da26ab4d0d97cb06b17878b80e3441ac2e4 Mon Sep 17 00:00:00 2001 From: Niranjan Artal Date: Tue, 3 Dec 2024 17:21:12 -0800 Subject: [PATCH] Fix for Scan OneRowRelation Signed-off-by: Niranjan Artal --- .../com/nvidia/spark/rapids/tool/planparser/ReadParser.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/main/scala/com/nvidia/spark/rapids/tool/planparser/ReadParser.scala b/core/src/main/scala/com/nvidia/spark/rapids/tool/planparser/ReadParser.scala index a87ed67d1..ac43bf783 100644 --- a/core/src/main/scala/com/nvidia/spark/rapids/tool/planparser/ReadParser.scala +++ b/core/src/main/scala/com/nvidia/spark/rapids/tool/planparser/ReadParser.scala @@ -42,6 +42,8 @@ case class ReadMetaData(schema: String, location: String, format: String, object ReadParser extends Logging { // It was found that some eventlogs could have "NativeScan" instead of "Scan" val SCAN_NODE_PREFIXES = Seq("Scan", "NativeScan") + // Do not include OneRowRelation in the scan nodes, consider it as regular Exec + val SCAN_ONE_ROW_RELATION = "Scan OneRowRelation" // DatasourceV2 node names that exactly match the following labels val DATASOURCE_V2_NODE_EXACT_PREF = Set( "BatchScan") @@ -66,7 +68,7 @@ object ReadParser extends Logging { ) def isScanNode(nodeName: String): Boolean = { - SCAN_NODE_PREFIXES.exists(nodeName.startsWith(_)) + SCAN_NODE_PREFIXES.exists(nodeName.startsWith(_)) && !nodeName.startsWith(SCAN_ONE_ROW_RELATION) } def isScanNode(node: SparkPlanGraphNode): Boolean = {