diff --git a/tools/src/main/scala/com/nvidia/spark/rapids/tool/profiling/Analysis.scala b/tools/src/main/scala/com/nvidia/spark/rapids/tool/profiling/Analysis.scala index 76be27f572e..73eb7cea0cd 100644 --- a/tools/src/main/scala/com/nvidia/spark/rapids/tool/profiling/Analysis.scala +++ b/tools/src/main/scala/com/nvidia/spark/rapids/tool/profiling/Analysis.scala @@ -96,7 +96,7 @@ class Analysis(apps: Seq[ApplicationInfo], fileWriter: Option[ToolTextFileWriter } } if (query.nonEmpty) { - apps.head.runQuery(query + " order by appIndex, Duration desc", + apps.head.runQuery(query + " order by appIndex, Duration desc, ID", false, fileWriter, messageHeader) } else { fileWriter.foreach(_.write("Unable to calculate Job and Stage Metrics\n"))