diqiu50 opened a new pull request, #11288:
URL: https://github.com/apache/gravitino/pull/11288

   ### What changes were proposed in this pull request?
   
   Add read-only view support to the Gravitino Spark Hive connector:
   
   - `HiveViewCatalogOperations`: accept Spark dialect in view creation and 
loading.
   - `BaseCatalog`: fall through to view lookup in `loadTable` when identifier 
is
     not a table; check view existence in `tableExists`.
   - `SparkHiveView`: new V2 Table that executes view SQL via SparkSession on 
the
     driver and returns rows as a single in-memory partition.
   - `GravitinoHiveCatalog`: override `createSparkView` to return 
`SparkHiveView`.
   
   ### Why are the changes needed?
   
   Fix: #11287
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes — users can now SELECT from Gravitino views via Spark SQL on Hive 
catalogs.
   Note: CREATE VIEW via Spark SQL is not supported due to a Spark V2 named 
catalog
   limitation; views must be created through the Gravitino API.
   
   ### How was this patch tested?
   
   - Unit test: `testCreateViewAcceptsSparkDialect` in 
`TestHiveCatalogOperations`
   - Integration tests: 4 new cases in `SparkHiveCatalogIT`:
     `testSelectHiveView`, `testTableExistsForView`, 
`testShowTablesExcludesViews`,
     `testCreateViewViaSql`


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