-
Notifications
You must be signed in to change notification settings - Fork 337
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
[#5547] feat(core): support schema pre event for Gravitino server #5559
Conversation
private final SchemaInfo createdSchemaRequest; | ||
|
||
public CreateSchemaPreEvent( | ||
String user, NameIdentifier identifier, SchemaInfo createdSchemaRequest) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
createdSchemaRequest -> createSchemaRequest?
* @return A {@link SchemaInfo} instance encapsulating the comprehensive details of the newly | ||
* created schema. | ||
*/ | ||
public SchemaInfo createdSchemaInfo() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
createdSchemaInfo -> createSchemaRequest?
@@ -30,7 +30,7 @@ public class AlterTablePreEvent extends TablePreEvent { | |||
|
|||
public AlterTablePreEvent(String user, NameIdentifier identifier, TableChange[] tableChanges) { | |||
super(user, identifier); | |||
this.tableChanges = tableChanges; | |||
this.tableChanges = tableChanges.clone(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In post-event, the objects are cloned to prevent the user from changing the object. But in pre-event, I prefer to relax the constraint to allow users to make changes to in inject some custom logic.
@orenccl thanks for your PR, LGTM except minor comments. |
Hi @FANNG1 |
@orenccl merged to main, thanks for your contribution! |
What changes were proposed in this pull request?
add schema pre event to event listener
Why are the changes needed?
Close: #5547
Does this PR introduce any user-facing change?
no
How was this patch tested?
add Unit Test