jackye1995 commented on issue #6420: URL: https://github.com/apache/iceberg/issues/6420#issuecomment-1397751094
I don't know if it would work or too crazy, just to throw the idea out that I just came up with: We could potentially make MV a representation in view spec, in parallel to the SQL representation. So for a materialized view, it could have 2 representations: ``` [ { "type" : "sql", "sql" : "SELECT \"count\"(*) my_cnt\nFROM\n base_tab\n", => Note the updated text from the ‘replace’ view statement "dialect" : "spark", "schema-id" : 2, "default-catalog" : "iceberg", "default-namespace" : [ "anorwood" ] }, { "type" : "materialized", "namespace": "some_namespace" "table" : "some_storage_table" } ] ``` By doing so, you could support a case where 1 view does not really have a SQL representation, but just a few different table layouts: ``` [ { "type" : "materialized", "namespace": "some_namespace" "table" : "some_storage_table_partitioned_by_col1" }, { "type" : "materialized", "namespace": "some_namespace" "table" : "some_storage_table_partitioned_by_col2" } ] ``` which satisfies the use case described by Walaa. -- 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-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org