-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
"In the current AlterTableAddColumnsRequest implementation, the NewColumnTransform relies on a raw SQL expression to define new columns. This approach is not intuitive as it obscures critical metadata such as the column type, default value, and nullability constraints.
To improve the clarity and maintainability of the API, could we enhance the structure to explicitly support fields like column_name, column_type, and column_default_value? This structured approach would provide better validation at the request level and a more user-friendly experience compared to parsing a complex expression string."
public class AlterTableAddColumnsRequest {
public static final String JSON_PROPERTY_ID = "id";
@Nullable
private List<String> id = new ArrayList();
public static final String JSON_PROPERTY_NEW_COLUMNS = "new_columns";
@Nonnull
private List<NewColumnTransform> newColumns = new ArrayList();
}
public class NewColumnTransform {
public static final String JSON_PROPERTY_NAME = "name";
@Nonnull
private String name;
public static final String JSON_PROPERTY_EXPRESSION = "expression";
@Nonnull
private String expression;
public NewColumnTransform() {
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels