Skip to content

Conversation

@xudong963
Copy link
Member

The usage:

let view_matcher = ViewMatcher::try_new_from_state(&session_state).await?;
let table_ref = TableReference::bare("my_table");
let candidates = view_matcher.get_mv_candidates_for_table(&table_ref);

Comment on lines +123 to +127
/// Returns materialized views that potentially reference the given table.
///
/// This is a preliminary filter - it only checks if the MV references the table
/// but does NOT guarantee that the MV can actually be used to rewrite queries
/// involving that table.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@matthewmturner, as the comment says, the method will return a superset, if we want to return the exact candidates, the API could be complex or require users to give a SpjNormalForm, which is a bit hard to understand.

For our usecase, the current API should be enough, wdyt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant