From 62c06ad019c582b67d81303548f8d3ccdc7622c7 Mon Sep 17 00:00:00 2001 From: native-zhang Date: Mon, 9 Dec 2024 21:47:33 +0800 Subject: [PATCH] [KYUUBI #6726][FOLLOWUP] Fix compilation on scala-2.13 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Description Currently, Kyuubi supports Trino progress in scala-2.12, but got some error in scala-2.13. * Make Trino progress available in scala-2.13 ## Types of changes :bookmark: - [x] Bugfix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Test Plan ๐Ÿงช --- # Checklist ๐Ÿ“ - [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html) **Be nice. Be informative.** Closes #6841 from naive-zhang/trino-scala13. Closes #6726 0693d281a [Cheng Pan] Update externals/kyuubi-trino-engine/pom.xml c20c49a3e [native-zhang] modify scala code style 6cfe4453e [native-zhang] unify scala grammar c0cd92e47 [native-zhang] change total stage num back into 3 in TrinoOperationProgressSuite 852398ddc [naive-zhang] Merge branch 'apache:master' into trino-scala13 6a038ec2b [native-zhang] move trino progress monitor available in profile scala-2.13 f434a2142 [native-zhang] move trino progress monitor into scala-2.12 impl and change state num in some test case 8d291f513 [native-zhang] add scala version diff in pom for trino module Lead-authored-by: native-zhang Co-authored-by: Cheng Pan Co-authored-by: naive-zhang Signed-off-by: Cheng Pan --- .../org/apache/kyuubi/engine/trino/TrinoProgressMonitor.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/TrinoProgressMonitor.scala b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/TrinoProgressMonitor.scala index 5328f092ec9..466944e39c7 100644 --- a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/TrinoProgressMonitor.scala +++ b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/TrinoProgressMonitor.scala @@ -49,9 +49,9 @@ class TrinoProgressMonitor(trino: StatementClient) { stage.getFailedTasks) stages.append((TrinoStage(stageId), stageProgress)) val subStages = asScalaBuffer(stage.getSubStages) - stageQueue.enqueue(subStages: _*) + stageQueue ++= subStages.toSeq } - SortedMap(stages: _*) + SortedMap(stages.toSeq: _*) } else { SortedMap() }