wayne-x-wang commented on code in PR #7793:
URL: https://github.com/apache/kyuubi/pull/7793#discussion_r4345801389


##########
externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/util/PaimonCatalogUtils.scala:
##########
@@ -0,0 +1,72 @@
+/*
+ * 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.kyuubi.engine.spark.util
+
+import java.lang.reflect.{InvocationTargetException, Method}
+import java.util.Optional
+import java.util.regex.Pattern
+
+import scala.collection.JavaConverters._
+
+import org.apache.spark.sql.connector.catalog.{CatalogPlugin, Identifier}
+
+/** Access Paimon's optional view interface without a runtime dependency on 
Paimon. */
+private[spark] object PaimonCatalogUtils {
+  private val SUPPORT_VIEW = "org.apache.paimon.spark.catalog.SupportView"

Review Comment:
   Thanks for the guidance. I agree that Kyuubi should use Spark’s standard 
ViewCatalog API rather than introduce a Paimon-specific adapter.
   I checked Paimon’s latest release, 2.1.0, and its current master. Both still 
use Paimon’s own SupportView interface, and the published Spark connectors 
currently go up to Spark 4.1. My original reproduction uses Spark 3.5 and 
Paimon 2.0, so switching Kyuubi to the standard API would not resolve that 
case. Upgrading Spark alone would also be insufficient until Paimon adopts the 
standard interface.
   Would it make sense to rework this PR into generic GetTables support for 
Spark 4.2’s ViewCatalog, removing the Paimon-specific adapter and test setup? I 
would update the title, description, and tests to reflect that scope, and leave 
#7772 unresolved pending Paimon’s migration. Alternatively, would you prefer to 
defer this work until a supported connector provides a concrete integration 
case?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to