Core: Add credentials to loadTable / loadView responses#11173
Merged
nastra merged 4 commits intoapache:mainfrom Oct 18, 2024
Merged
Core: Add credentials to loadTable / loadView responses#11173nastra merged 4 commits intoapache:mainfrom
nastra merged 4 commits intoapache:mainfrom
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); |
Contributor
There was a problem hiding this comment.
I think we need a check to make sure prefix isn't empty?
Contributor
Author
There was a problem hiding this comment.
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()); |
Contributor
There was a problem hiding this comment.
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
approved these changes
Oct 17, 2024
Contributor
amogh-jahagirdar
left a comment
There was a problem hiding this comment.
Thanks @nastra this looks good to me!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This implements the Spec changes from #10722