Core: Add view-override catalog property#12534
Conversation
smaheshwar-pltr
left a comment
There was a problem hiding this comment.
This is looking great to me - thank you @ebyhr for driving these features!
| @Override | ||
| public Table create() { | ||
| Endpoint.check(endpoints, Endpoint.V1_CREATE_TABLE); | ||
| propertiesBuilder.putAll(tableOverrideProperties()); |
There was a problem hiding this comment.
Nit from me (feel free to ignore): I wonder whether some private buildProperties: Map<String, String> method that puts overrides and calls buildKeepingLast to be used in the various terminal methods of this class is cleaner, but not sure.
| Table table = | ||
| catalog() | ||
| .buildTable(ident, SCHEMA) | ||
| .withProperty("override-key4", "catalog-overridden-key4") |
There was a problem hiding this comment.
Extreme nit: these tests look great but I'm bad at reading so at first was confused by this 😄. Could rename value here and elsewhere to table-key4 / view-key4 to be super explicit but do feel free to ignore
| .put( | ||
| CatalogProperties.TABLE_DEFAULT_PREFIX + "override-key3", | ||
| "catalog-default-key3") |
There was a problem hiding this comment.
Hmm I realise this has been done for previous PRs so can look past this, but I wonder whether, given these catalog properties are specific to CatalogTests, are required for them to pass, and aren't specific to individual catalogs, they should instead be provided on the CatalogTests themselves somehow instead of being hardcoded strings in each initialisation of the XCatalogTest subclasses.
Maybe: Could provide some CATALOG_PROPERTIES map containing them on CatalogTests that subclasses are contracted to initialise respective catalogs with (along with those specific to that catalog e.g. JDBC username / password).
2ac9a10 to
9e986a2
Compare
view-override catalog property + fix missing table-override property in REST catalogview-override catalog property
f7486df to
fa3e3a3
Compare
fa3e3a3 to
09592c2
Compare
|
@ebyhr could you also please add some docs to https://github.com/apache/iceberg/blob/25e7897b1161d5548ff428e0ec9016d5934635a1/docs/docs/spark-configuration.md#catalog-configuration for this new property? |
|
@nastra Sure, added a new commit documenting the property. |
Add support for
view-overridecatalog property.