JingsongLi commented on code in PR #497:
URL: https://github.com/apache/paimon-rust/pull/497#discussion_r3562706152


##########
crates/integrations/datafusion/src/sql_context.rs:
##########
@@ -1514,6 +1569,72 @@ impl SQLContext {
     }
 }
 
+fn validate_persistent_create_view(create_view: &CreateView) -> DFResult<()> {
+    let unsupported = if create_view.or_alter {
+        Some("CREATE OR ALTER VIEW is not supported")
+    } else if create_view.or_replace {
+        Some("CREATE OR REPLACE VIEW is not supported")
+    } else if create_view.secure {

Review Comment:
   Fixed in 25838b1. validate_persistent_create_view now rejects 
CreateView::copy_grants explicitly, and COPY GRANTS is covered by the 
unsupported-clause regression test. The focused persistent REST view test suite 
passes.



##########
crates/paimon/src/catalog/rest/rest_catalog.rs:
##########
@@ -278,6 +278,22 @@ impl Catalog for RESTCatalog {
         })
     }
 
+    async fn create_view(
+        &self,
+        identifier: &Identifier,
+        schema: crate::catalog::ViewSchema,
+        ignore_if_exists: bool,
+    ) -> Result<()> {
+        let result = self
+            .api
+            .create_view(identifier, schema)
+            .await
+            .map_err(|error| map_rest_error_for_view(error, identifier));

Review Comment:
   Fixed in 25838b1. RESTCatalog create_view now uses an operation-specific 
mapper that converts a create-time 404 to DatabaseNotExist for the parent 
database, while preserving the existing 409 and 501 mappings. Added a 
missing-database regression test; all create-view catalog tests pass.



-- 
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]

Reply via email to