tchivs commented on PR #8208: URL: https://github.com/apache/paimon/pull/8208#issuecomment-4678091467
@JingsongLi I pushed a follow-up commit to address the old review questions from #6667 and a few local review edge cases. PTAL when you have time. What changed: - The JDBC catalog initializes a `paimon_views` metadata table automatically. It stores `(catalog_key, database_name, view_name, view_schema)` with a primary key on the catalog/database/view tuple. - View definitions are stored as serialized Paimon `ViewSchema`; JDBC catalog does not parse or resolve the SQL text during `createView`. This is covered by tests for nonexistent table references and cross-database references. - Cross-database `renameView` is supported and tested. - Concurrent duplicate view creation is covered by a two-thread test and relies on the JDBC metadata primary key. I also centralized uniqueness violation detection for SQLite message text and common SQLState-based drivers. - Added hardening for catalog invariants: non-cascade `dropDatabase` now rejects view-only databases, `renameView` rejects missing target databases, and table/view same-name collisions are rejected on create and rename paths. - Added JDBC catalog view documentation in concepts, Flink SQL DDL, and Spark SQL DDL docs. Local validation: - `git diff --check` - `mvn -pl paimon-core spotless:check` - `mvn -pl paimon-core -am -Pfast-build -DfailIfNoTests=false -Dtest=JdbcCatalogTest test` -- 67 tests, 0 failures - `mvn -pl paimon-core -am -DfailIfNoTests=false -Dtest=JdbcCatalogTest test` -- 67 tests, 0 failures I also retried `mvn -pl paimon-flink/paimon-flink-common -am -Pfast-build -DfailIfNoTests=false -Dtest=JdbcCatalogViewITCase test`, but it was blocked before test execution by the external Jindo dependency repository timeout while resolving `com.aliyun.jindodata:jindo-core:6.9.1` / `jindo-sdk:6.9.1` for unrelated `paimon-jindo`. -- 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]
