{{ message }}
Repository navigation
[KYUUBI #7772][SPARK] List Paimon persistent views through GetTables - #7793
Open
wayne-x-wang wants to merge 1 commit into
Open
wayne-x-wang wants to merge 1 commit into
wayne-x-wang wants to merge 1 commit into
Conversation
…ables Discover Paimon's optional SupportView API without a runtime dependency and return persistent views and their comments through JDBC metadata. Honor table-type filters for non-session catalogs and preserve the identities-only fast path. Cover Paimon and ordinary V2 catalog metadata, run connector regressions in Spark 3.5 CI, and include the Paimon test directory in Scalastyle checks.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Why are the changes needed?
Paimon persistent views can be queried through Kyuubi, but JDBC GetTables omits them because the non-session catalog path only calls TableCatalog.listTables. A VIEW-only request also returns ordinary tables on this path.
Discover Paimon's optional SupportView interface through the catalog's class hierarchy and use its listViews/loadView methods to return persistent views as VIEW rows with their comments. Apply the existing name-pattern and namespace handling, and honor table-type filters when ignoreTableProperties=false. The adapter does not introduce a Paimon runtime dependency and preserves the original causes of connector errors.
Keep the existing ignoreTableProperties=true fast path: ignore table-type criteria, return TABLE rows with empty comments, and skip Paimon view enumeration. Persistent Paimon view listing is therefore supported when this configuration is false, which is the default.
The table-type filtering correction applies to non-session TableCatalog implementations generally; Paimon-specific view discovery only applies to catalogs exposing SupportView.
How was this patch tested?
Added PaimonMetadataSuite with a local SQLite-backed Paimon JDBC catalog. Its 13 tests cover table/view type filters, null and lowercase types, JDBC name patterns, quoted names, namespaces, comments and absent comments, the identities-only fast path, optional-interface absence, connector failures, and filtering before loading view metadata.
Added 7 JDBC tests to the default-source SparkCatalogDatabaseOperationSuite using a non-Paimon TableCatalog fixture. They check returned catalog/schema/name/type/comment, matching and unsupported types, null and empty types, metadata-loading errors, and the identities-only fast path. A catalog that throws from loadTable verifies that the fast path skips metadata loading while still ignoring type criteria and applying name patterns. The suite now has 10 tests.
The Paimon suite is wired into a dedicated step in the existing Spark 3.5 / Java 17 CI job. That step explicitly disables jdbc-shaded because shaded JDBC classes are produced during package, whereas this step uses a test reactor.
The engine's regular Scalastyle configuration explicitly includes both src/test/scala and src/test/scala-paimon. The existing Style CI therefore checks the Paimon test source even without activating the connector test profile.
With Java 17 and Scala 2.12, run the ordinary V2 tests without the Paimon profile:
Run the Paimon tests:
Run Scalastyle and Spotless without the Paimon test profile:
Current local validation on Spark 3.5.8, Java 17, Scala 2.12:
Earlier validation of the same production patch on Spark 3.5.6:
Runtime validation does not establish support across other Spark/Paimon combinations or Hive/REST metastores.
Was this patch assisted by generative AI tooling?
Assisted-by: Codex (GPT-6)