db icon indicating copy to clipboard operation
db copied to clipboard

Base refresh materialized view

Open Gerych1984 opened this issue 1 year ago • 4 comments

Q A
Is bugfix?
New feature? ✔️
Breaks BC?

Gerych1984 avatar Jan 22 '24 11:01 Gerych1984

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.64%. Comparing base (ef81e8b) to head (4e86a29). Report is 9 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #800   +/-   ##
=========================================
  Coverage     99.64%   99.64%           
- Complexity     1271     1277    +6     
=========================================
  Files            63       63           
  Lines          3106     3119   +13     
=========================================
+ Hits           3095     3108   +13     
  Misses           11       11           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jan 22 '24 11:01 codecov[bot]

I think materialized views should be added in complex. With create, alter, drop and refresh methods. And take into account features of all supported DBMSs.

So, we should realize all these methods for all supported DBMSs which support materialized views.

That's what this PR is made for. Without it, i can't go any further

Gerych1984 avatar Jan 31 '24 06:01 Gerych1984

Added this to the 2.0.0 milestone due to (almost) any change of interfaces breaks BC

Tigrov avatar Jan 31 '24 07:01 Tigrov

With create, alter, drop and refresh methods.

From what I see in MS SQL / Oracle / Clickhouse / PostgreSQL docs:

DROP: PostgreSQL requires DROP MATERIALIZED VIEW, other databases use simple DROP VIEW.

ALTER - quite different one from another

  • MS SQL only allows enable/disable MV
  • PostgreSQL allows modify name / column names / other options excluding source query
  • Clickhouse only allows to change source query
  • Oracle — refresh mode and type, enable/disable.

CREATE — MS SQL, PostgreSQL and Oracle has common syntax part, but Oracle has lots of useful extensions. All except MS SQL have option to skip data population (WITH NO DATA).

  • PostgreSQL — column names, storage options and other.
  • MS SQL — data distribution
  • Oracle — additional query for faster refresh, syntax for automatic refresh and partitioning.
  • Clickhouse — just query and SQL SECURITY.

smirnov-e avatar May 05 '24 18:05 smirnov-e