-
Notifications
You must be signed in to change notification settings - Fork 332
CLI: Add Hive federation option #2798
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
base: main
Are you sure you want to change the base?
Conversation
| uri=self.catalog_uri, | ||
| authentication_parameters=auth_params, | ||
| service_identity=service_identity, | ||
| warehouse=self.hadoop_warehouse |
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.
It's weird to use hadoop_warehouse. We might use the name warehouse, so that it can be applied to both Hadoop and Hive federation.
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.
Thoughts, suggestions? @HonahX @eric-maynard @MonkeyCanCode
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.
Sry for the late response. I was away for couple of days. I don't have a strong preference over this naming. Maybe ask @eric-maynard as he initially added it in eb6b6ad.
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.
The tentative convention I had in mind was to prefix each argument with the federation type it's specific to -- namely, ICEBERG_REMOTE_CATALOG_NAME is specific to iceberg federation type, and HADOOP_WAREHOUSE is specific to HADOOP. I thought it might be unclear what just REMOTE_CATALOG_NAME or WAREHOUSE meant.
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.
to be clear I'm supportive of re-using these flags across federations types (e.g. across Hive / Hadoop) and indeed I think if we ever flesh out federation in the way that I envisioned at this time we would need to. There would be a way to federate to a Hive catalog both for Iceberg and non-Iceberg tables, and these would surely share arguments.
My only hesitation would be that the CLI 's method of handling arguments is a bit brittle and if we re-use them we should just make sure the parsing and the --help display behave the way we expect.
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.
Pull Request Overview
This PR adds Hive federation support to the CLI by introducing a new "hive" connection type for external catalogs. This allows users to federate with Hive catalogs alongside the existing Iceberg REST and Hadoop options.
- Added "hive" as a supported catalog connection type in CLI constants and commands
- Updated CLI documentation to reflect the new hive option
- Added validation and configuration logic for Hive connections
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| site/content/in-dev/unreleased/command-line-interface.md | Updated documentation to include "hive" in the list of supported catalog connection types |
| client/python/test/test_cli_parsing.py | Added test cases for Hive federation scenarios with both implicit and OAuth authentication |
| client/python/cli/constants.py | Added HIVE enum value to CatalogConnectionType |
| client/python/cli/command/catalogs.py | Added HiveConnectionConfigInfo import, validation logic, and configuration building for Hive connections |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| f" and {Argument.to_flag_name(Arguments.CATALOG_URI)}") | ||
| elif self.catalog_connection_type == CatalogConnectionType.HIVE.value: | ||
| if not self.hadoop_warehouse or not self.catalog_uri: | ||
| raise Exception(f"Missing required argument for connection type 'HIVE':" |
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.
nit: --help was updated to list iceberg-rest, hadoop, hive so these logs (and the tests) should follow that same convention
No description provided.