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

Core: Add explicit JSON parser for LoadTableResponse #11148

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

nastra
Copy link
Contributor

@nastra nastra commented Sep 17, 2024

This introduces an explicit JSON parser for LoadTableResponse as a preparation step for standardizing credentials as proposed in #10722.

Currently, LoadTableResponse is relying on reflection to properly do JSON <--> LoadTableResponse.
Having an explicit JSON parser has the advantage that the underlying credentials can be parsed in a way that gives us more flexiblity and allows to be fully forward/backward compatible when new credentials are being added.

This currently depends on #11151

@github-actions github-actions bot added the core label Sep 17, 2024
@nastra nastra changed the title Core: Add explicit parser for LoadTableResponse Core: Add explicit JSON parser for LoadTableResponse Sep 17, 2024
@@ -61,7 +62,12 @@ public String metadataLocation() {
}

public TableMetadata tableMetadata() {
return TableMetadata.buildFrom(metadata).withMetadataLocation(metadataLocation).build();
if (null == metadataWithLocation) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we were rebuilding the metadata on every call to tableMetadata() which was required when java reflection was used for JSON deserialiazion. However, now this isn't needed anymore, so we can compute the metadata with the location only once

@nastra
Copy link
Contributor Author

nastra commented Sep 19, 2024

thanks @amogh-jahagirdar for the review

@nastra nastra merged commit e3088bc into apache:main Sep 19, 2024
46 checks passed
@nastra nastra deleted the loadtableresponse-parser branch September 19, 2024 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants