You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by GitBox <gi...@apache.org> on 2021/12/01 06:46:03 UTC

[GitHub] [incubator-kyuubi] mmuru commented on a change in pull request #1476: [KYUUBI #1458] Delta lake table columns won't show up in DBeaver.

mmuru commented on a change in pull request #1476:
URL: https://github.com/apache/incubator-kyuubi/pull/1476#discussion_r759894719



##########
File path: externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/shim/CatalogShim_v2_4.scala
##########
@@ -125,7 +126,12 @@ class CatalogShim_v2_4 extends SparkCatalogShim {
     databases.flatMap { db =>
       val identifiers = catalog.listTables(db, tablePattern, includeLocalTempViews = true)
       catalog.getTablesByName(identifiers).flatMap { t =>
-        t.schema.zipWithIndex.filter(f => columnPattern.matcher(f._1.name).matches())
+        var tableSchema: StructType = null;
+        tableSchema = t.schema
+        if (t.provider.getOrElse("") == "delta") {
+          tableSchema = spark.table(t.identifier.table).schema
+        }
+        tableSchema.zipWithIndex.filter(f => columnPattern.matcher(f._1.name).matches())

Review comment:
       Yes, I changed it.  No, 'delta' is always lower case so I added equalsIgnoreCase. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org