Skip to content

Issue 7335 - Refactor AddTableRequestSerDe & tests#7693

Merged
patchwork01 merged 20 commits into
developfrom
7335-rest-api-serde
Jul 20, 2026
Merged

Issue 7335 - Refactor AddTableRequestSerDe & tests#7693
patchwork01 merged 20 commits into
developfrom
7335-rest-api-serde

Conversation

@patchwork01

Copy link
Copy Markdown
Collaborator

Make sure you have checked all steps below.

Issue

Tests

  • My PR adds the following tests based on our test strategy OR does not need testing for this extremely good reason:
    • Updated AddTableRequestSerDeTest, AddTableRouteTest

Documentation

  • In case of new functionality, my PR adds documentation that describes how to use it, or I have linked to a
    separate issue for that below.
  • If I have added new Java code, I have added Javadoc that explains it following our conventions and style.
  • If I have added or removed any dependencies from the project, I have updated the NOTICES file.

@patchwork01
patchwork01 marked this pull request as ready for review July 17, 2026 11:41
@patchwork01
patchwork01 marked this pull request as draft July 17, 2026 11:41
@patchwork01 patchwork01 changed the title Issue 7335 - Refactor AddTableRequestSerDe Issue 7335 - Refactor AddTableRequestSerDe & tests Jul 17, 2026
@patchwork01
patchwork01 marked this pull request as ready for review July 17, 2026 11:54
@patchwork01 patchwork01 added the needs-reviewer Pull requests that need a reviewer to be assigned label Jul 17, 2026
@ca61688 ca61688 self-assigned this Jul 20, 2026
@ca61688

ca61688 commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Does the AddTableResponseSerDe not need updating?

}

@Override
public AddTableRequest deserialize(JsonElement jsonElement, java.lang.reflect.Type typeOfSrc, JsonDeserializationContext context) throws JsonParseException {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think you don't need the java.lang.reflect.Type as that seems to be imported in this class

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure how that happened, thanks.

private static TableProperties readTableProperties(InstanceProperties instanceProperties, JsonObject object, JsonDeserializationContext context) {
Properties properties = context.deserialize(object.get("properties"), Properties.class);
Schema schema = context.deserialize(object.get("schema"), Schema.class);
if (properties == null) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This can be moved above the schema desiralizing as there's no point in doing that if the properties is null

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done, thanks.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I find the split points object in these tests confusing where certain tests set splitPoints to something but it isn't clear from the test that createAddTableRequest picks this up. Please add a second createAddTableRequest method that takes the split points in as a list and have the current one call that with List.of()

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done, thanks.

@ca61688 ca61688 assigned patchwork01 and unassigned ca61688 Jul 20, 2026
@ca61688 ca61688 removed the needs-reviewer Pull requests that need a reviewer to be assigned label Jul 20, 2026
@patchwork01 patchwork01 assigned ca61688 and unassigned patchwork01 Jul 20, 2026
@ca61688

ca61688 commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Does the AddTableResponseSerDe not need updating?

Spoke to @patchwork01 and they had looked at the response object and didn't believe there were changes to be made there. Approving for merge

@ca61688 ca61688 assigned patchwork01 and unassigned ca61688 Jul 20, 2026
@patchwork01
patchwork01 merged commit 5e49314 into develop Jul 20, 2026
9 checks passed
@patchwork01
patchwork01 deleted the 7335-rest-api-serde branch July 20, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Decouple add table request/response SerDe from model & route tests

3 participants