Skip to content

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
@nastra nastra force-pushed the loadtableresponse-parser branch from 4378597 to c92778d Compare September 17, 2024 10:06
@nastra nastra force-pushed the loadtableresponse-parser branch from c92778d to e742224 Compare September 17, 2024 18:29
@nastra nastra force-pushed the loadtableresponse-parser branch from e742224 to 25de5c1 Compare September 18, 2024 05:43

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
@nastra nastra deleted the loadtableresponse-parser branch September 19, 2024 05:48
zachdisc pushed a commit to zachdisc/iceberg that referenced this pull request Dec 23, 2024
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