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
Comment on lines +784 to +787
ns, tbl, err := splitIdentForPath(identifier)
if err != nil {
return nil, err
}

Choose a reason for hiding this comment

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

Suggested change
ns, tbl, err := splitIdentForPath(identifier)
if err != nil {
return nil, err
}
namespace, table, err := splitIdentifierForPath(identifier)
if err != nil {
return nil, err
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree that the suggestions are more detailed. But ns, tbl, and Props are consistently used throughout the codebase

id = append([]string{r.name}, identifier...)
}

tblProps := maps.Clone(r.props)

Choose a reason for hiding this comment

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

Suggested change
tblProps := maps.Clone(r.props)
tableProperties := maps.Clone(r.props)

@github-actions github-actions bot removed the INFRA label Dec 31, 2024
README.md Outdated
Comment on lines 1 to 34
<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-->

# Iceberg Golang

[![Go Reference](https://pkg.go.dev/badge/github.com/apache/iceberg-go.svg)](https://pkg.go.dev/github.com/apache/iceberg-go)

`iceberg` is a Golang implementation of the [Iceberg table spec](https://iceberg.apache.org/spec/).

## Build From Source

### Prerequisites

* Go 1.21 or later

### Build

```shell
$ git clone https://github.com/apache/iceberg-go.git
$ cd iceberg-go/cmd/iceberg && go build .
Copy link
Member

Choose a reason for hiding this comment

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

Why is this being removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahhh ! my bad. This wasn't intended.

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

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