Skip to content

Conversation

lliangyu-lin
Copy link
Contributor

@lliangyu-lin lliangyu-lin commented Aug 22, 2025

Which issue does this PR close?

What changes are included in this PR?

  • Implement CatalogBuilder for hms catalog
  • Update tests to use the new builder pattern to load the catalog

Are these changes tested?

Yes, updated existing tests

Copy link
Contributor

@liurenjie1024 liurenjie1024 left a comment

Choose a reason for hiding this comment

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

Thanks @lliangyu-lin for this pr, generally LGTM!

Comment on lines 68 to 70
if props.contains_key(MEMORY_CATALOG_IO_TYPE) {
self.0.io_type = props.get(MEMORY_CATALOG_IO_TYPE).cloned()
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need this, we could infer from MEMORY_CATALOG_WAREHOUSE.

Copy link
Contributor Author

@lliangyu-lin lliangyu-lin Aug 25, 2025

Choose a reason for hiding this comment

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

In that case we also need to make warehouse non-optional. Or do you mean when warehouse is set, infer the file io from warehouse scheme but can still keep the io type when warehouse is not set?

Copy link
Contributor

@liurenjie1024 liurenjie1024 left a comment

Choose a reason for hiding this comment

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

Thanks @lliangyu-lin for this pr, generally LGTM! Just two nits.

) -> impl Future<Output = Result<Self::C>> + Send {
self.0.name = Some(name.into());

// if props.contains_key(MEMORY_CATALOG_IO_TYPE) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Missed it. Will remove this

file_io,
warehouse_location,
file_io: FileIO::from_path(&config.warehouse)
.unwrap()
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we should unwrap here.

Copy link
Contributor

@liurenjie1024 liurenjie1024 left a comment

Choose a reason for hiding this comment

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

Thanks @lliangyu-lin for this pr!

@liurenjie1024 liurenjie1024 merged commit f7e9308 into apache:main Aug 28, 2025
17 checks passed
Fokko pushed a commit that referenced this pull request Sep 1, 2025
## Which issue does this PR close?

<!--
We generally require a GitHub issue to be filed for all bug fixes and
enhancements and this helps us generate change logs for our releases.
You can link an issue to this PR using the GitHub syntax. For example
`Closes #123` indicates that this PR will close issue #123.
-->

- Closes #.

## What changes are included in this PR?

<!--
Provide a summary of the modifications in this PR. List the main changes
such as new features, bug fixes, refactoring, or any other updates.
-->

* Previous #1600 added few integration tests, but need to include the
new changes introduced in memory catalog loader change #1623 .
* This caused build failures

## Are these changes tested?

Yes, existing tests

<!--
Specify what test covers (unit test, integration test, etc.).

If tests are not included in your PR, please explain why (for example,
are they covered by existing tests)?
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement catalog loader for memory catalog.
2 participants