apache / gravitino

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
https://gravitino.apache.org
Apache License 2.0
1.1k stars 348 forks source link

[Subtask] support schema pre event for Gravitino server #5547

Closed FANNG1 closed 2 weeks ago

FANNG1 commented 2 weeks ago

Describe the subtask

  1. add corresponding SchemaPreEvent
  2. generate pre-event in SchemaEventDispatcher
  3. add test in TestSchemaEvent
  4. add document in gravitino-server-config.md

Please refer to the implemetation of table pre event in #5539

Parent issue

5317

orenccl commented 2 weeks ago

It has a reference. I think I’ll be able to take this one. Please assign it to me, and I’ll work on it within a few days.

xunliu commented 2 weeks ago

@orenccl Thank you for your interesting in this issue. I assigned it to you.

orenccl commented 2 weeks ago

Hi @FANNG1,

I noticed that in AlterTableEvent, this.tableChanges is set to tableChanges.clone(), while in AlterTablePreEvent, this.tableChanges is assigned directly as tableChanges. Should it also be tableChanges.clone() in AlterTablePreEvent?

Additionally, in gravitino-server-config.md, updateTablePreEvent should be updated to AlterTablePreEvent.

I've made these modifications in the PR; please let me know if this approach looks good to you.

FANNG1 commented 2 weeks ago

Good catch, @orenccl ! I commented related issues in the PR.