zeroshade commented on code in PR #414:
URL: https://github.com/apache/iceberg-go/pull/414#discussion_r2080217572
##########
catalog/sql/sql.go:
##########
@@ -147,6 +149,19 @@ type sqlIcebergNamespaceProps struct {
PropertyValue sql.NullString
}
+type sqlIcebergView struct {
+ bun.BaseModel `bun:"table:iceberg_views"`
+
+ CatalogName string `bun:",pk"`
+ ViewNamespace string `bun:",pk"`
+ ViewName string `bun:",pk"`
+ ViewSQL string
+ SchemaJSON string
+ MetadataLocation sql.NullString
+ PreviousMetadataLocation sql.NullString
+ Properties map[string]string `bun:",json"`
Review Comment:
Looking at
https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/jdbc/JdbcCatalog.java
it looks like instead of being a separate table, handling Views consists of
just adding a new record type column named `iceberg_type` which is a
`varchar(5)`. Which will be `TABLE` for tables and `VIEW` for views. So let's
follow the same pattern and not create a new 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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]