You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2023/01/18 01:56:47 UTC

[GitHub] [iceberg] jackye1995 commented on pull request #6611: Spec: Make schema-id required for SQL View Representation

jackye1995 commented on PR #6611:
URL: https://github.com/apache/iceberg/pull/6611#issuecomment-1386354696

   > I think the reason it was optional is to support cases where views are created via API rather than by a SQL parser
   
   Nice that we are clarifying this now. If we support this case of no schema, it means the view will "auto-update" itself when the source table schemas change. This might be a good thing or bad thing depending on the use case. 
   
   I think in most database systems at this moment, view schema is fixed at creation time. For example, if we support this in Trino, since we cannot derive the schema and cannot fulfill the `List<ViewColumn> columns` part of the `ConnectorViewDefinition`, we will fail at`checkViewStaleness`. Core Trino logic needs to be updated to support this case, but it is still achieveable.
   
   I also checked mySQL, https://dev.mysql.com/doc/refman/8.0/en/alter-table.html, the wording here for ALTER TABLE RENAME COLUMN:
   
   >  Views and stored programs that refer to the renamed column. You must manually alter the definition of these objects to refer to the new column name. 
   
   seems to suggest the view schema definition is fixed.
   
   I don't know if there is any ANSI definition or other places that specify a fixed schema is a requirement for view. Is anyone aware of that?


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org