From 902eaf9dbf8d7df9be8ce043b68685831549a393 Mon Sep 17 00:00:00 2001 From: senmiaoliu Date: Fri, 4 Aug 2023 09:58:11 +0800 Subject: [PATCH] [KYUUBI #5105][Bug] getColumns gets duplicate column names when Spark integrates with Iceberg close #5105 - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [ ] [Run test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests) locally before make a pull request Closes #5128 from lsm1/features/kyuubi_5105. Closes #5105 84be7fd6d [senmiaoliu] distinct default namespace Authored-by: senmiaoliu Signed-off-by: Cheng Pan (cherry picked from commit 007fc477b7d724851bb555aabf69324e8b1cb53d) Signed-off-by: Cheng Pan --- .../org/apache/kyuubi/engine/spark/shim/CatalogShim_v3_0.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/shim/CatalogShim_v3_0.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/shim/CatalogShim_v3_0.scala index a663ba636..11f19cdf9 100644 --- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/shim/CatalogShim_v3_0.scala +++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/shim/CatalogShim_v3_0.scala @@ -110,7 +110,7 @@ class CatalogShim_v3_0 extends CatalogShim_v2_4 { listAllNamespaces(catalog).filter { ns => val quoted = ns.map(quoteIfNeeded).mkString(".") p.matcher(quoted).matches() - }.distinct + }.map(_.toList).toList.distinct.map(_.toArray).toArray } private def getSchemasWithPattern(catalog: CatalogPlugin, schemaPattern: String): Seq[String] = {