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

Add builder.default annotations to fields in CreateUpdateTableRequestBody with default values defined #97

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public class CreateUpdateTableRequestBody {
defaultValue = "false",
description = "Boolean that determines creating a staged table",
example = "false")
@Builder.Default
private boolean stageCreate = false;

@Schema(description = "The version of table that the current update is based upon")
Expand All @@ -103,6 +104,7 @@ public class CreateUpdateTableRequestBody {

@Schema(description = "The type of a table")
@Valid
@Builder.Default
private TableType tableType = TableType.PRIMARY_TABLE;

Copy link
Collaborator

Choose a reason for hiding this comment

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

can we do a log-screenshot check again at tableservice layer that verifies:

  1. if request field is not provided by the client, springboot sets it as the respective default
  2. if request field is provided by the client, springboot honors it
    ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will do!

Copy link
Collaborator Author

@ctrezzo ctrezzo Jun 19, 2024

Choose a reason for hiding this comment

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

@HotSushi Finally got around to this. Here are screenshots of 2 curl commands. One does not specify a table type and the other specifies a replica table type (i.e. not the default). The screenshots show the proper responses.
Screenshot 2024-06-19 at 11 44 12 AM
Screenshot 2024-06-19 at 11 46 03 AM

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Also here are screenshots of the persisted metadata in the iceberg metadata file for the tables showing the proper table type.
Screenshot 2024-06-19 at 3 55 18 PM
Screenshot 2024-06-19 at 3 56 42 PM

public String toJson() {
Expand Down
Loading