Support ALTER MATERIALIZED VIEW ... SET PROPERTIES ...#9613
Merged
sopel39 merged 3 commits intotrinodb:masterfrom Jan 25, 2022
Merged
Support ALTER MATERIALIZED VIEW ... SET PROPERTIES ...#9613sopel39 merged 3 commits intotrinodb:masterfrom
sopel39 merged 3 commits intotrinodb:masterfrom
Conversation
3557a83 to
cf37d85
Compare
lukasz-stec
reviewed
Oct 13, 2021
Member
lukasz-stec
left a comment
There was a problem hiding this comment.
Would be good to have high-level test like BaseConnectorTest.testRenameMaterializedView
core/trino-main/src/main/java/io/trino/execution/SetPropertiesTask.java
Outdated
Show resolved
Hide resolved
core/trino-parser/src/main/antlr4/io/trino/sql/parser/SqlBase.g4
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/SetPropertiesTask.java
Outdated
Show resolved
Hide resolved
Member
|
Please base your PR on top of #9401 |
bd6a521 to
6c268c7
Compare
Author
|
#9401 has been merged into master and I have rebased this PR onto master. |
c837fbc to
f495d80
Compare
sopel39
reviewed
Oct 14, 2021
core/trino-parser/src/main/java/io/trino/sql/parser/AstBuilder.java
Outdated
Show resolved
Hide resolved
core/trino-parser/src/test/java/io/trino/sql/parser/TestSqlParser.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/security/AccessControl.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/SetPropertiesTask.java
Outdated
Show resolved
Hide resolved
30d5126 to
b97ad90
Compare
sopel39
reviewed
Oct 15, 2021
core/trino-main/src/main/java/io/trino/execution/SetPropertiesTask.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/analyzer/StatementAnalyzer.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/CreateMaterializedViewTask.java
Outdated
Show resolved
Hide resolved
36331ed to
61b8681
Compare
electrum
previously requested changes
Oct 15, 2021
Member
electrum
left a comment
There was a problem hiding this comment.
There are some problems with the existing ALTER TABLE ... SET PROPERTIES that need to be resolved, so we need to hold off on this until that is done.
61b8681 to
bdfdfec
Compare
Member
@electrum what problems do you mean? |
77ff9f3 to
f6b9ad6
Compare
1d1a6ba to
cd3beca
Compare
05d60cf to
6afac02
Compare
ae56504 to
848b17a
Compare
848b17a to
c81a4ea
Compare
sopel39
approved these changes
Jan 18, 2022
core/trino-main/src/main/java/io/trino/execution/SetPropertiesTask.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/metadata/AbstractCatalogPropertyManager.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/metadata/AbstractPropertyManager.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/metadata/AbstractPropertyManager.java
Outdated
Show resolved
Hide resolved
core/trino-parser/src/main/java/io/trino/sql/tree/Property.java
Outdated
Show resolved
Hide resolved
core/trino-parser/src/main/java/io/trino/sql/tree/Property.java
Outdated
Show resolved
Hide resolved
d9f41af to
4810808
Compare
sopel39
reviewed
Jan 19, 2022
core/trino-parser/src/main/java/io/trino/sql/tree/Property.java
Outdated
Show resolved
Hide resolved
f0db549 to
34bed1f
Compare
added 3 commits
January 24, 2022 16:14
This commit implements ALTER MATERIALIZED VIEW ... SET PROPERTIES... in the core engine. The implementation supports the use of a newly introduced SQL keyword "DEFAULT" on the right hand side of a property assignment. The support of the DEFAULT keyword is implemented by modifying certain classes related to properties in general (i.e. they are not specific to materialized view). Consequently, several other SQL statements also gain the support of the DEFAULT keyword "for free". They are: ALTER TABLE... ADD COLUMN... ANALYZE CREATE MATERIALIZED VIEW CREATE SCHEMA CREATE TABLE (both column properties and table properties) CREATE TABLE AS Note, however, that ALTER TABLE ... SET PROPERTIES ... is not in the list above. Support for DEFAULT in ALTER TABLE...SET PROPERTIES... requires extensive changes and will therefore be implemented in a subsequent commit.
There are two versions of AccessControl.checkCanCreateTable: the old deprecated version and the newer version which takes an additional Map<String, Object> parameter "properties"(so that the properties can be taken into account when making an access control decision). Which version is to be used should depend solely on the FeatureConfig parameter "disableSetPropertiesSecurityCheckForCreateDdl" - it should not depend on whether the "properties" parameter is empty.
34bed1f to
842d8b2
Compare
Closed
This was referenced Jan 25, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements support for the ALTER MATERIALIZED VIEW ... SET PROPERTIES ... statement