Skip to content
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

Add support for Materialized Views #173

Open
jayadevanm opened this issue Sep 10, 2024 · 5 comments
Open

Add support for Materialized Views #173

jayadevanm opened this issue Sep 10, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@jayadevanm
Copy link

The documentation does mention that Views are not supported. It looks like Materialized Views are also not supported, though they are more like tables than views. We can create indexes, they contain data etc.

@jayadevanm jayadevanm added the enhancement New feature or request label Sep 10, 2024
@bplunkett-stripe
Copy link
Collaborator

It's unfortunately not the straight forward (think webs of dependencies), but I do intend to add support for them and have a mental model in my head as to how I will achieve it. I first would like to refactor the SQL generation a bit before I implement (materialized) views.

@KEHyeon
Copy link

KEHyeon commented Jan 9, 2025

@bplunkett-stripe I wonder when the View will be added.
and I'm very interested in this project. Can I try refactoring it too?

@bplunkett-stripe
Copy link
Collaborator

Sure! You can give it a shot, but a thorough implementation will be pretty complex. I can try to add really simple view support in the future.

@KEHyeon
Copy link

KEHyeon commented Feb 5, 2025

@bplunkett-stripe
First, I want to analyze this project code. Can you briefly explain the code and internal principles?

@bplunkett-stripe
Copy link
Collaborator

There are three main parts:

  1. Schema extraction
  2. Schema diffing
  3. SQL generation

The latter part is the most complex: we take the diff generated from step 2 and build a graph that we topologically sort in order to get our ordered SQL statements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants