-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MATERIALIZED VIEW]: java.lang.IllegalArgumentException: Duplicate key [tpcds1t.b] found #10229
Comments
I'm not sure what the meaning of obtaining table names in this place is. I think there are two ways to solve this problem
|
Removing duplicates would be the right solution. The property is set here: https://github.com/trinodb/trino/blob/master/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadata.java#L964 This property tracks snapshot-ids of all the tables present in the materialized view definition, captured at the time of last refresh of materialized view. This helps establish freshness of materialized view. |
We stumbled accross this as well and this happens very often in our analytical queries which can reference the same source table multiple times Seems like we simply would need to apply additional distinct() on the source table stream before serializing the table list. However I am not sure if the IcebergTableHandles fed into finishRefreshMaterializedView() are really equal(), the distinct would be sufficient on schema and table name only. Is that assumption correct? Would you be interested in a pull request for this one? |
The text was updated successfully, but these errors were encountered: