rdblue commented on code in PR #7992:
URL: https://github.com/apache/iceberg/pull/7992#discussion_r1253436167


##########
api/src/main/java/org/apache/iceberg/view/SQLViewRepresentation.java:
##########
@@ -37,17 +36,7 @@ default String type() {
   /** The view query SQL dialect. */
   String dialect();
 
-  /** The default catalog when the view is created. */
-  @Nullable
-  String defaultCatalog();

Review Comment:
   The rationale for removing this isn't necessarily true. We could make this 
implicit, but it actually causes some problems with how we want to maintain the 
SQL without modification.
   
   This was added to fill in necessary information that may be missing from the 
statement that created the view. For example:
   
   ```sql
   USE prod.default; -- catalog=prod, schema=default
   CREATE OR REPLACE VIEW other_catalog.views.new_view (id, row_count) AS
   SELECT id, count(1)
   FROM some_table
   GROUP BY id
   ```
   
   As you can see, the current catalog and namespace don't necessarily match 
the catalog and namespace that were current when the view was created. That 
means we either have to rewrite the SQL text or store the current catalog and 
namespace from the environment.



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