This is an automated email from the ASF dual-hosted git repository.
liujiayi771 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gluten.git
The following commit(s) were added to refs/heads/main by this push:
new d3df3ae2ad [MINOR][CORE] Fix description sorting in Gluten SQL UI
(#13650)
d3df3ae2ad is described below
commit d3df3ae2ad9d198840fc38de1d1c1e498bd180e4
Author: Zouxxyy <[email protected]>
AuthorDate: Tue Nov 17 10:16:09 2026 +0800
[MINOR][CORE] Fix description sorting in Gluten SQL UI (#13650)
---
.../sql/execution/ui/GlutenAllExecutionsPage.scala | 2 +-
.../ui/GlutenExecutionDataSourceSuite.scala | 35 ++++++++++++++++++++++
2 files changed, 36 insertions(+), 1 deletion(-)
diff --git
a/gluten-ui/src/main/scala/org/apache/spark/sql/execution/ui/GlutenAllExecutionsPage.scala
b/gluten-ui/src/main/scala/org/apache/spark/sql/execution/ui/GlutenAllExecutionsPage.scala
index af153e28c4..d19dc0f8d8 100644
---
a/gluten-ui/src/main/scala/org/apache/spark/sql/execution/ui/GlutenAllExecutionsPage.scala
+++
b/gluten-ui/src/main/scala/org/apache/spark/sql/execution/ui/GlutenAllExecutionsPage.scala
@@ -278,7 +278,7 @@ private[ui] class GlutenExecutionDataSource(
private def ordering(sortColumn: String, desc: Boolean):
Ordering[GlutenExecutionTableRowData] = {
val ordering: Ordering[GlutenExecutionTableRowData] = sortColumn match {
case "ID" => Ordering.by(_.executionUIData.executionId)
- case "Description" => Ordering.by(_.executionUIData.fallbackDescription)
+ case "Description" => Ordering.by(_.executionUIData.description)
case "Num Gluten Nodes" => Ordering.by(_.executionUIData.numGlutenNodes)
case "Num Fallback Nodes" =>
Ordering.by(_.executionUIData.numFallbackNodes)
case unknownColumn => throw
QueryExecutionErrors.unknownColumnError(unknownColumn)
diff --git
a/gluten-ut/test/src/test/scala/org/apache/spark/sql/execution/ui/GlutenExecutionDataSourceSuite.scala
b/gluten-ut/test/src/test/scala/org/apache/spark/sql/execution/ui/GlutenExecutionDataSourceSuite.scala
new file mode 100644
index 0000000000..193697381b
--- /dev/null
+++
b/gluten-ut/test/src/test/scala/org/apache/spark/sql/execution/ui/GlutenExecutionDataSourceSuite.scala
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.spark.sql.execution.ui
+
+import org.apache.spark.SparkFunSuite
+
+class GlutenExecutionDataSourceSuite extends SparkFunSuite {
+ test("sort executions by description instead of fallback plan") {
+ val executions = Seq(
+ new GlutenSQLExecutionUIData(1L, "z-query", 0, 0, "a-plan", Seq.empty),
+ new GlutenSQLExecutionUIData(2L, "a-query", 0, 0, "z-plan", Seq.empty))
+
+ val ascending = new GlutenExecutionDataSource(executions, 10,
"Description", desc = false)
+ assert(ascending.sliceData(0, 10).map(_.executionUIData.description) ===
+ Seq("a-query", "z-query"))
+
+ val descending = new GlutenExecutionDataSource(executions, 10,
"Description", desc = true)
+ assert(descending.sliceData(0, 10).map(_.executionUIData.description) ===
+ Seq("z-query", "a-query"))
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]