-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Core: Add support for view-default
property in catalog
#11064
base: main
Are you sure you want to change the base?
Conversation
a0ed40f
to
a130aaa
Compare
a130aaa
to
2d41458
Compare
c4aa6ae
to
1b935cb
Compare
CI hit #10172 |
@RussellSpitzer Can you review this PR when you have time? |
1b935cb
to
8206c5f
Compare
core/src/test/java/org/apache/iceberg/view/ViewCatalogTests.java
Outdated
Show resolved
Hide resolved
@@ -29,6 +29,7 @@ private CatalogProperties() {} | |||
public static final String WAREHOUSE_LOCATION = "warehouse"; | |||
public static final String TABLE_DEFAULT_PREFIX = "table-default."; | |||
public static final String TABLE_OVERRIDE_PREFIX = "table-override."; | |||
public static final String VIEW_DEFAULT_PREFIX = "view-default."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That probably makes sense since we have the table-default as well, but i have no problem this being in a followup
This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions. |
@ebyhr are you still working on this? |
@nastra Yes, I was actually waiting for next review round. |
@@ -85,6 +86,7 @@ public String name() { | |||
@Override | |||
public void initialize(String name, Map<String, String> properties) { | |||
this.catalogName = name != null ? name : InMemoryCatalog.class.getSimpleName(); | |||
this.catalogProperties = ImmutableMap.copyOf(properties); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Careful here, ImmutableMap.copyOf isn't null safe
@@ -94,6 +96,11 @@ public void initialize(String name, Map<String, String> properties) { | |||
closeableGroup.setSuppressCloseFailure(true); | |||
} | |||
|
|||
@Override | |||
protected Map<String, String> properties() { | |||
return catalogProperties == null ? ImmutableMap.of() : catalogProperties; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depending on what you do above this may or may not be necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is still needed in case initialize()
hasn't been called
core/src/test/java/org/apache/iceberg/view/ViewCatalogTests.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/apache/iceberg/view/BaseMetastoreViewCatalog.java
Outdated
Show resolved
Hide resolved
2f6f9fc
to
5a19171
Compare
core/src/test/java/org/apache/iceberg/view/ViewCatalogTests.java
Outdated
Show resolved
Hide resolved
core/src/test/java/org/apache/iceberg/view/ViewCatalogTests.java
Outdated
Show resolved
Hide resolved
core/src/test/java/org/apache/iceberg/view/ViewCatalogTests.java
Outdated
Show resolved
Hide resolved
4afe084
to
7911403
Compare
178a06f
to
eb8b60b
Compare
core/src/test/java/org/apache/iceberg/catalog/CatalogTests.java
Outdated
Show resolved
Hide resolved
eb8b60b
to
08cb705
Compare
This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions. |
08cb705
to
17c3043
Compare
Rebased on main branch to resolve conflicts. |
17c3043
to
a9d239a
Compare
Fixes #10822