JingsongLi opened a new pull request, #497: URL: https://github.com/apache/paimon-rust/pull/497
## Summary Add end-to-end persistent `CREATE VIEW` support for Paimon REST Catalogs through `SQLContext`. The defining query is planned in the view's owning namespace, its schema is inferred by DataFusion, and the Java-compatible view request is persisted through the catalog API. ## Changes - add `CreateViewRequest`, `ViewSchema::new`, `Catalog::create_view`, and `ViewAlreadyExist` - implement REST create-view transport, HTTP 409 mapping, `IF NOT EXISTS`, and HTTP 501 fallback - support `CREATE VIEW [IF NOT EXISTS] name [(columns)] AS query` in `SQLContext` - infer field types/nullability, preserve the canonical DataFusion query, and bind bare relations/functions to the target catalog and database - validate explicit column lists and reject unsupported persistent-view modifiers instead of silently ignoring them - document the supported syntax and current limitations in the DataFusion README and SQL guide ## Testing - [x] `cargo test -p paimon --test rest_object_models_test --test rest_api_test --test rest_catalog_test` - [x] `cargo test -p paimon-datafusion --lib sql_context::tests -- --test-threads=1` - [x] `cargo test -p paimon-datafusion --lib persistent_rest_catalog_view_ -- --test-threads=1` - [x] `cargo clippy -p paimon -p paimon-datafusion --lib --tests -- -D warnings` - [x] `cargo fmt --all -- --check` - [x] `mkdocs build --strict` ## Notes - Persistent `CREATE VIEW` is implemented by REST Catalog; other catalog implementations keep the default `Unsupported` behavior. - `CREATE OR REPLACE VIEW`, materialized/secure views, comments/options, persistent `ALTER VIEW` / `DROP VIEW`, and persistent function DDL remain out of scope. -- 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]
