-
Notifications
You must be signed in to change notification settings - Fork 41
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
base: main
Are you sure you want to change the base?
Conversation
@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) |
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.
be verbose with naming conventions.
ns, tbl, err := splitIdentForPath(identifier) | ||
if err != nil { | ||
return nil, err | ||
} |
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.
ns, tbl, err := splitIdentForPath(identifier) | |
if err != nil { | |
return nil, err | |
} | |
namespace, table, err := splitIdentifierForPath(identifier) | |
if err != nil { | |
return nil, err | |
} |
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.
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) |
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.
tblProps := maps.Clone(r.props) | |
tableProperties := maps.Clone(r.props) |
README.md
Outdated
<!-- | ||
- 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 . |
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.
Why is this being removed?
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.
Ahhh ! my bad. This wasn't intended.
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, | ||
}, | ||
} |
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.
any reason not to create a struct for this instead of the maps?
for k, v := range ret.Config { | ||
tblProps[k] = v | ||
} |
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.
maps.Copy(tblProps, ret.Config)
?
Part of #63 . Tried implementing createTable, dropTable and renameTable methods taking reference to loadTable and rest-catalog-open-api.