-
Notifications
You must be signed in to change notification settings - Fork 51
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
conditional materialized view refresh and create-replace for the view #87
base: main
Are you sure you want to change the base?
Conversation
The fundamental problem with this approach is that if you change the model between the runs, the behavior is vastly different from what you would expect, e.g., changing the model as expected. We do have a system for this, though, which I think we can rely on our "cached views" system. It's mainly defined in this file: https://github.com/quarylabs/quary/blob/main/rust/core/src/automatic_branching.rs. We currently use it for our development flow; suppose you have models A, B, and C that depend on each other as follows, and you are pushing them to production in a materialized way.
It essentially measures the diff between your local setup and what's in production and tries to use as much "production" as possible to rely on materialized models as much as possible. So if your local models change C to C', you can still rely on production A and B because those are identical. At its core, it's a "diffing system" that I think we can use here as well, to both speed up builds by
I hope some of the above makes sense. |
Ben, thank you, yes it makes total sense. |
#141 The beginning! |
- should infer it from file
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5.0.0 to 5.0.1. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](actions/setup-go@0c52d54...cdcb360) --- updated-dependencies: - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [petgraph](https://github.com/petgraph/petgraph) from 0.6.4 to 0.6.5. - [Changelog](https://github.com/petgraph/petgraph/blob/master/RELEASES.rst) - [Commits](https://github.com/petgraph/petgraph/compare/petgraph@v0.6.4...petgraph@v0.6.5) --- updated-dependencies: - dependency-name: petgraph dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [prost-build](https://github.com/tokio-rs/prost) from 0.12.3 to 0.12.4. - [Release notes](https://github.com/tokio-rs/prost/releases) - [Commits](tokio-rs/prost@v0.12.3...v0.12.4) --- updated-dependencies: - dependency-name: prost-build dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [rust-embed](https://github.com/pyros2097/rust-embed) from 8.3.0 to 8.4.0. - [Changelog](https://github.com/pyrossh/rust-embed/blob/master/changelog.md) - [Commits](https://github.com/pyros2097/rust-embed/commits) --- updated-dependencies: - dependency-name: rust-embed dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.197 to 1.0.203. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](serde-rs/serde@v1.0.197...v1.0.203) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [prost-build](https://github.com/tokio-rs/prost) from 0.12.4 to 0.12.6. - [Release notes](https://github.com/tokio-rs/prost/releases) - [Commits](tokio-rs/prost@v0.12.4...v0.12.6) --- updated-dependencies: - dependency-name: prost-build dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.37.0 to 1.38.0. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](tokio-rs/tokio@tokio-1.37.0...tokio-1.38.0) --- updated-dependencies: - dependency-name: tokio dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [testcontainers-modules](https://github.com/testcontainers/testcontainers-rs-modules-community) from 0.4.2 to 0.4.3. - [Release notes](https://github.com/testcontainers/testcontainers-rs-modules-community/releases) - [Changelog](https://github.com/testcontainers/testcontainers-rs-modules-community/blob/main/CHANGELOG.md) - [Commits](testcontainers/testcontainers-rs-modules-community@v0.4.2...v0.4.3) --- updated-dependencies: - dependency-name: testcontainers-modules dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.2.11 to 5.2.12. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v5.2.12/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
for issue: #88
hi I've started testing
quary
in the production and hitting dependencies errors: If I follow the logic ofDROP/CREATE
view I can't do it withoutCASCADE
deleting all dependencies. The same withmaterialized views
.I suggest that for the view and materialized view there would be no
DROP
command and then changed creation commands:view
:CREATE OR REPLACE VIEW ...
materialized view
: checking if the view exists first and based on that eitherREFRESH MATERIALIZED VIEW ..
orCREATE MATERIALIZED VIEW ..
. In case ofREFRESH
there is no issue with dependent views.thank you