Skip to content
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

Implemented Remaining Catalog operations for REST catalog #240

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

chil-pavn
Copy link
Contributor

Part of #63 . Tried implementing createTable, dropTable and renameTable methods taking reference to loadTable and rest-catalog-open-api.

@github-actions github-actions bot added the INFRA label Dec 30, 2024
@zeroshade
Copy link
Member

@chil-pavn In general this is looking good, I'll give it a more in-depth review in the next couple days. Could you add some unit tests for these as we have for the other functions? (basically just mocking out the server responses with a local http server)

Copy link

@piyushsingariya piyushsingariya left a comment

Choose a reason for hiding this comment

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

be verbose with naming conventions.

catalog/rest.go Show resolved Hide resolved
catalog/rest.go Show resolved Hide resolved
catalog/rest.go Show resolved Hide resolved
@github-actions github-actions bot removed the INFRA label Dec 31, 2024
README.md Outdated Show resolved Hide resolved
Comment on lines +659 to +668
payload := map[string]interface{}{
"source": map[string]interface{}{
"namespace": strings.Split(fromNs, namespaceSeparator),
"name": fromTbl,
},
"destination": map[string]interface{}{
"namespace": strings.Split(toNs, namespaceSeparator),
"name": toTbl,
},
}
Copy link
Member

Choose a reason for hiding this comment

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

any reason not to create a struct for this instead of the maps?

Comment on lines +821 to +823
for k, v := range ret.Config {
tblProps[k] = v
}
Copy link
Member

Choose a reason for hiding this comment

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

maps.Copy(tblProps, ret.Config)?

@chil-pavn
Copy link
Contributor Author

Hey @zeroshade , it appears there was already PR #146 for the same table operations, which also got merged. Should i work on the unit tests, as i could see that was not included in the PR?

@zeroshade
Copy link
Member

@chil-pavn that would be fantastic thanks!

@chil-pavn
Copy link
Contributor Author

@zeroshade Sure, I will take that up. Also, it would be very helpful if i we link PRs to the respected issues.

@zeroshade
Copy link
Member

Ideally we should definitely be doing that, I'll definitely admit to my own mistakes in not doing so lately. :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants