morningman opened a new issue, #71464:
URL: https://github.com/apache/doris/issues/71464

   ### Background
   
   A standard Iceberg view stores a declared output schema, a saved namespace, 
and one or more SQL representations in its current version. Users share these 
views between engines through an Iceberg REST catalog or Hive Metastore.
   
   ### Current behavior
   
   Doris uses the engine name in the Iceberg view summary to prefer a 
representation. A shared Hive Metastore can also mirror that SQL as a 
traditional view definition, which hides the current version's other 
representations from a Hive catalog.
   
   ### Expected behavior
   
   A view with `spark` and `DoRiS` representations should execute the Doris SQL 
in Doris, even when the view version was written by Spark. Users should be able 
to inspect a view's stored dialects and describe its declared schema before a 
query can run.
   
   ### Proposed design
   
   Route HMS relations using their metastore markers and load the current 
Iceberg metadata through the existing catalog APIs. Keep the schema, SQL 
representations and name-resolution context in one statement snapshot. Prefer 
Doris SQL in compatible mode and preserve the old selection in explicit legacy 
mode. Use the query user's permissions for standard view dependencies.
   
   ### Impact
   
   This affects users querying standard Iceberg views through REST, Iceberg 
HMS, or a Hive catalog sharing the HMS. Traditional Hive views can also be 
exposed explicitly through an Iceberg HMS catalog.
   
   ### Reproduction or evidence
   
   The REST and HMS fixtures store distinguishable SQL representations with 
`engine-name=Spark`. The model fixture returns 7 for Spark SQL and 42 for Doris 
SQL. A standard view without HMS mirror text is still identified from its 
Iceberg marker and metadata location.
   
   ### Scope and non-goals
   
   This change covers reading views and executing a stored Doris 
representation. Representation writes and source dialect conversion are 
follow-up work.
   
   ### Acceptance criteria
   
   - REST, Iceberg HMS and Hive catalog queries select the current Doris 
representation.
   - `DESC` displays the declared schema and `SHOW VIEW DIALECTS FROM` reports 
the selection.
   - A nested view resolves names in its saved namespace, and the caller needs 
access to its dependencies.
   - Tests cover Spark-only views, schema drift, cycles, and shared HMS routing.
   
   ### Risks and compatibility
   
   The default representation policy changes on REST and Iceberg HMS catalogs. 
Catalogs that rely on the previous policy can select 
`iceberg.view.dialect-mode=legacy`. The connector API addition provides a 
default adapter for existing definitions.
   
   ### Related
   
   Iceberg standard view metadata and SQL representations.
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to