Skip to content

Core: Add support for view-default property in catalog#11064

Merged
nastra merged 1 commit intoapache:mainfrom
ebyhr:ebi/view-default-properties
Jan 7, 2025
Merged

Core: Add support for view-default property in catalog#11064
nastra merged 1 commit intoapache:mainfrom
ebyhr:ebi/view-default-properties

Conversation

@ebyhr
Copy link
Member

@ebyhr ebyhr commented Sep 2, 2024

Fixes #10822

@ebyhr ebyhr force-pushed the ebi/view-default-properties branch from a0ed40f to a130aaa Compare September 2, 2024 03:05
@ebyhr ebyhr marked this pull request as draft September 2, 2024 03:17
@ebyhr ebyhr force-pushed the ebi/view-default-properties branch from a130aaa to 2d41458 Compare September 2, 2024 04:03
@ebyhr ebyhr force-pushed the ebi/view-default-properties branch 5 times, most recently from c4aa6ae to 1b935cb Compare September 2, 2024 05:41
@ebyhr
Copy link
Member Author

ebyhr commented Sep 2, 2024

CI hit #10172

@ebyhr
Copy link
Member Author

ebyhr commented Sep 2, 2024

@RussellSpitzer Can you review this PR when you have time?

@ebyhr ebyhr force-pushed the ebi/view-default-properties branch from 1b935cb to 8206c5f Compare September 3, 2024 23:51
@ebyhr ebyhr marked this pull request as ready for review September 4, 2024 00:00
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.";
Copy link
Contributor

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. I also raised a similar PR which I think is not required anymore. Do you think we should also add "view-override." ?

Copy link
Member

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

@github-actions
Copy link

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 [email protected] list. Thank you for your contributions.

@github-actions github-actions bot added the stale label Nov 13, 2024
@nastra
Copy link
Contributor

nastra commented Nov 13, 2024

@ebyhr are you still working on this?

@ebyhr
Copy link
Member Author

ebyhr commented Nov 13, 2024

@nastra Yes, I was actually waiting for next review round.

@Override
public void initialize(String name, Map<String, String> properties) {
this.catalogName = name != null ? name : InMemoryCatalog.class.getSimpleName();
this.catalogProperties = ImmutableMap.copyOf(properties);
Copy link
Member

@RussellSpitzer RussellSpitzer Nov 13, 2024

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


@Override
protected Map<String, String> properties() {
return catalogProperties == null ? ImmutableMap.of() : catalogProperties;
Copy link
Member

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

Copy link
Contributor

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

@github-actions github-actions bot removed the stale label Nov 14, 2024
@ebyhr ebyhr force-pushed the ebi/view-default-properties branch from 2f6f9fc to 5a19171 Compare November 14, 2024 12:52
@ebyhr ebyhr force-pushed the ebi/view-default-properties branch 2 times, most recently from 4afe084 to 7911403 Compare November 16, 2024 07:14
@github-actions github-actions bot added the hive label Nov 16, 2024
@ebyhr ebyhr force-pushed the ebi/view-default-properties branch 2 times, most recently from 178a06f to eb8b60b Compare November 24, 2024 23:43
@github-actions
Copy link

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 [email protected] list. Thank you for your contributions.

@github-actions github-actions bot added the stale label Dec 26, 2024
@ebyhr ebyhr force-pushed the ebi/view-default-properties branch from 08cb705 to 17c3043 Compare December 26, 2024 00:18
@ebyhr
Copy link
Member Author

ebyhr commented Dec 26, 2024

Rebased on main branch to resolve conflicts.

@ebyhr ebyhr force-pushed the ebi/view-default-properties branch from 17c3043 to a9d239a Compare December 26, 2024 00:41
@github-actions github-actions bot removed the stale label Dec 27, 2024
@nastra nastra merged commit f129588 into apache:main Jan 7, 2025
50 checks passed
@ebyhr ebyhr deleted the ebi/view-default-properties branch January 17, 2025 05:18
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.

View Default Properties in the Catalog

5 participants