-
Notifications
You must be signed in to change notification settings - Fork 3k
Core: Add credentials to loadTable / loadView responses #11173
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
Conversation
8c78bf8 to
72ced3e
Compare
fc38274 to
5c517fb
Compare
5c517fb to
9f33b09
Compare
|
|
||
| public static Credential fromJson(JsonNode json) { | ||
| Preconditions.checkArgument(null != json, "Cannot parse credential from null object"); | ||
| String prefix = JsonUtil.getString(PREFIX, json); |
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 think we need a check to make sure prefix isn't empty?
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.
hm yeah good point, we should maybe do the same for the config to make sure the config isn't empty. I've done that and added a test
|
|
||
| gen.writeStartObject(); | ||
|
|
||
| gen.writeStringField(PREFIX, credential.prefix()); |
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.
Same as below I think we need validation that the prefix isn't empty before serializing it?
core/src/main/java/org/apache/iceberg/rest/responses/LoadTableResponse.java
Show resolved
Hide resolved
core/src/main/java/org/apache/iceberg/rest/responses/LoadTableResponse.java
Outdated
Show resolved
Hide resolved
amogh-jahagirdar
left a comment
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.
Thanks @nastra this looks good to me!
This implements the Spec changes from #10722