laskoviymishka opened a new pull request, #2353:
URL: https://github.com/apache/iceberg-go/pull/2353

   Hive's CreateView took the caller's *view.Version only to pick a SQL string. 
It then rebuilt the view's first version from that one representation through 
view.CreateViewWithIOProperties, so the persisted metadata dropped every other 
representation, replaced the summary with {engine-name: iceberg-go}, set the 
default namespace to the view's own namespace and stamped default-catalog as 
"hive". Java's BaseMetastoreViewCatalog keeps the representations, default 
namespace and default catalog the engine passes, and the REST catalog here 
already sends the version as given.
   
   This adds view.CreateViewFromVersion, which writes a view whose first 
version is the one the caller built. It keeps every representation, the 
summary, the default namespace and the default catalog, resets the version ID 
to 1, and takes the schema ID from the stored schema. Fields left unset fall 
back to what the previous path wrote: a nil default namespace becomes the 
view's namespace, a nil summary gets the engine-name entry NewVersion sets, and 
a zero timestamp gets the current time. CreateView and 
CreateViewWithIOProperties now build their single-representation version and 
delegate to it, so their output is unchanged, except that a nil default 
namespace no longer serializes as null.
   
   Hive's CreateView passes its version through. The metastore's view text 
still comes from the Hive-dialect representation, or the first SQL one. The SQL 
catalog can use the same entry point when its view signatures are aligned with 
ViewCatalog.
   
   Refs #2062.


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