jerryshao commented on code in PR #9678:
URL: https://github.com/apache/gravitino/pull/9678#discussion_r2781112668


##########
docs/lakehouse-generic-delta-table.md:
##########
@@ -0,0 +1,390 @@
+---
+title: "Delta Lake table support"
+slug: /delta-table-support
+keywords:
+- lakehouse
+- delta
+- delta lake
+- metadata
+- generic catalog
+license: "This software is licensed under the Apache License version 2."
+---
+
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+
+## Overview
+
+This document describes how to use Apache Gravitino to manage a generic 
lakehouse catalog using Delta Lake as the underlying table format. Gravitino 
supports registering and managing metadata for external Delta tables.
+
+:::info Current Support
+Gravitino currently supports **external Delta tables only**. This means:
+- You can register existing Delta tables in Gravitino
+- Gravitino manages metadata only (schema, location, properties)
+- The physical Delta table data remains independent
+- Dropping tables from Gravitino does not delete the underlying Delta data
+:::
+
+## Table Management
+
+### Supported Operations
+
+For Delta tables in a Generic Lakehouse Catalog, the following table 
summarizes supported operations:
+
+| Operation | Support Status                                 |
+|-----------|------------------------------------------------|
+| List      | ✅ Full                                         |
+| Load      | ✅ Full                                         |
+| Alter     | ❌ Not supported (use Delta Lake APIs directly) |
+| Create    | ✅ Register external tables only                |
+| Drop      | ✅ Metadata only (data preserved)               |
+| Purge     | ❌ Not supported for external tables            |
+
+:::note Feature Limitations
+- **External Tables Only:** Must set `external=true` when creating Delta tables
+- **Alter Operations:** Not supported; modify tables using Delta Lake APIs or 
Spark, then update Gravitino metadata if needed
+- **Purge:** Not applicable for external tables; use DROP to remove metadata 
only
+- **Partitioning:** Identity partitions supported as metadata only; user must 
ensure consistency with actual Delta table
+- **Sort Orders:** Not supported in CREATE TABLE
+- **Distributions:** Not supported in CREATE TABLE
+- **Indexes:** Not supported in CREATE TABLE
+:::
+
+### Data Type Mappings
+
+Delta Lake uses Apache Spark data types. The following table shows type 
mappings between Gravitino and Delta/Spark:
+
+| Gravitino Type      | Delta/Spark Type       | Notes                         
  |
+|---------------------|------------------------|---------------------------------|
+| `Boolean`           | `BooleanType`          |                               
  |
+| `Byte`              | `ByteType`             |                               
  |
+| `Short`             | `ShortType`            |                               
  |
+| `Integer`           | `IntegerType`          |                               
  |
+| `Long`              | `LongType`             |                               
  |
+| `Float`             | `FloatType`            |                               
  |
+| `Double`            | `DoubleType`           |                               
  |
+| `Decimal(p, s)`     | `DecimalType(p, s)`    |                               
  |
+| `String`            | `StringType`           |                               
  |
+| `Binary`            | `BinaryType`           |                               
  |
+| `Date`              | `DateType`             |                               
  |
+| `Timestamp`         | `TimestampNTZType`     | No timezone, Spark 3.4+       
  |
+| `Timestamp_tz`      | `TimestampType`        | With timezone                 
  |
+| `List`              | `ArrayType`            |                               
  |
+| `Map`               | `MapType`              |                               
  |
+| `Struct`            | `StructType`           |                               
  |
+
+### Table Properties
+
+Required and optional properties for Delta tables in a Generic Lakehouse 
Catalog:
+
+| Property   | Description                                                     
                                                                                
                                                                       | 
Default | Required | Since Version |
+|------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|----------|---------------|
+| `format`   | Table format: must be `delta`                                   
                                                                                
                                                                       | (none) 
 | Yes      | 1.2.0         |
+| `location` | Storage path for the Delta table. Must point to a directory 
containing Delta Lake metadata (_delta_log). Supports file://, s3://, hdfs://, 
abfs://, gs://, and other Hadoop-compatible file systems.                  | 
(none)  | Yes      | 1.2.0         |
+| `external` | Must be `true` for Delta tables. Indicates that Gravitino 
manages metadata only <br/>and will not delete physical data when the table is 
dropped.                                                                        
   | (none)  | Yes      | 1.2.0         |
+
+**Location Requirement:** Must be specified at table level for external Delta 
table. See [Location 
Resolution](./lakehouse-generic-catalog.md#key-property-location).

Review Comment:
   It is correct for Delta table.



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