Skip to content

Conversation

@ebyhr
Copy link
Contributor

@ebyhr ebyhr commented Mar 15, 2025

Add support for view-override catalog property.

Copy link
Contributor

@smaheshwar-pltr smaheshwar-pltr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment on lines 40 to 42
.put(
CatalogProperties.TABLE_DEFAULT_PREFIX + "override-key3",
"catalog-default-key3")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

@ebyhr ebyhr force-pushed the ebi/catalog-view-override-properties branch from 2ac9a10 to 9e986a2 Compare March 17, 2025 08:08
@github-actions github-actions bot removed the OPENAPI label Mar 17, 2025
@ebyhr ebyhr changed the title Core: Add view-override catalog property + fix missing table-override property in REST catalog Core: Add view-override catalog property Mar 17, 2025
@ebyhr ebyhr force-pushed the ebi/catalog-view-override-properties branch from f7486df to fa3e3a3 Compare March 17, 2025 08:56
Copy link
Contributor

@nastra nastra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @ebyhr for working on this

@ebyhr ebyhr force-pushed the ebi/catalog-view-override-properties branch from fa3e3a3 to 09592c2 Compare March 17, 2025 11:53
@nastra
Copy link
Contributor

nastra commented Mar 17, 2025

@github-actions github-actions bot added the docs label Mar 18, 2025
@ebyhr
Copy link
Contributor Author

ebyhr commented Mar 18, 2025

@nastra Sure, added a new commit documenting the property.

@nastra nastra merged commit 8f6ebb5 into apache:main Mar 18, 2025
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants