API Call to listNamespacesWithPattern Method in org.apache.kyuubi.engine.spark.util.SparkCatalogUtils.getCatalogTablesOrViews #6059
mahalingamagesthian
started this conversation in
General
Replies: 1 comment 2 replies
-
sorry for the late reply, just back to the office from a long holiday. instead of talking about code details in a text conversation, would you mind sending a PR directly? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Background. We are using the Kyuubi JDBC driver to connect to a prominent BI Tool. During this,
We have identified that the API call to the method
listNamespacesWithPattern
, fromorg.apache.kyuubi.engine.spark.util.SparkCatalogUtils.getCatalogTablesOrViews
may not be required.Details: The following operation,
getCatalogTablesOrViews(spark,"spark_catalog","dbname","*",tableType,true)
or
get CatalogTablesOrViews(spark,"spark_catalog","dbname","tablename",tableType,true)
invokes
This Goes for a redundant listing of all the databases in Hive, it is happening at at https://github.com/apache/kyuubi/blob/branch-1.8/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/util/SparkCatalogUtils.scala#L163 .In order to perform this operation, it took about a minute.
The code block:
https://github.com/apache/kyuubi/blob/branch-1.8/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/util/SparkCatalogUtils.scala#L163
is invoked, there is no opportunity to use the namespaces further.
The code block: starting from
https://github.com/apache/kyuubi/blob/branch-1.8/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/util/SparkCatalogUtils.scala#L209
untill
https://github.com/apache/kyuubi/blob/branch-1.8/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/util/SparkCatalogUtils.scala#L223
may not be required as well.
Please let me know what are your thoughts on this, Thanks.
Beta Was this translation helpful? Give feedback.
All reactions