jerry-024 commented on code in PR #6469:
URL: https://github.com/apache/paimon/pull/6469#discussion_r2464283285


##########
docs/content/concepts/views.md:
##########
@@ -0,0 +1,111 @@
+---
+title: "Views"
+weight: 10
+type: docs
+aliases:
+- /concepts/views.html
+---
+<!--
+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.
+-->
+
+# Views
+
+Paimon views are logical table definitions managed in the catalog. A view 
stores only the SQL query that
+produces its result set, which allows one engine to define a view and other 
engines to consume it
+without duplicating data. View metadata can be coordinated across engines.
+
+## Catalog support
+
+View metadata is persisted only when the catalog implementation supports it:
+
+- **Hive metastore catalog** – view metadata is stored together with table 
metadata inside the
+  metastore warehouse.
+- **REST catalog** – view metadata is kept in the REST backend and exposed 
through the catalog API.
+
+File-system catalogs do not currently support views because they lack 
persistent metadata storage.
+
+
+### Representation structure
+
+| Field     | Type | Description |
+|-----------|------|-------------|
+| `query`   | `string` | Canonical SQL `SELECT` statement that defines the 
view. |
+| `dialect` | `string` | SQL dialect identifier (for example, `spark` or 
`flink`). |
+
+Multiple representations can be stored for the same version so that different 
engines can access the
+view using their native dialect.
+
+## Operations
+
+### Create or replace view
+
+Use `CREATE VIEW` or `CREATE OR REPLACE VIEW` to register a view. Paimon 
assigns a UUID, writes the
+first metadata file, and records version `1`.
+
+```sql
+CREATE VIEW sales_view AS
+SELECT region, SUM(amount) AS total_amount
+FROM sales
+GROUP BY region;
+```
+
+### Inspect view definitions
+
+- `SHOW VIEWS` lists all registered views in the current catalog.
+- `SHOW CREATE VIEW view_name` returns the canonical SQL representation of a 
view.
+
+### Alter view dialects via procedures
+

Review Comment:
   procedures -> procedure 



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