cmu-db / peloton

The Self-Driving Database Management System
http://pelotondb.io
Apache License 2.0
2.03k stars 623 forks source link

Tidy up the trigger interface & add the trigger in codegen executors #1006

Open seojungmin opened 6 years ago

seojungmin commented 6 years ago

First, I have found that the triggers are not added to the codegen executors (e.g. Insert). I think This happened because the codegen work was done based on the old executors without triggers.

Adding the feature was thought to be simple, as only a function call should be added at each trigger point. However, I found that the trigger interface is not very kind to the executor. The executor had to 1) check trigger list's nullability, 2) check whether the trigger with a certain type exists, and then 3) call to execute the trigger. I think the trigger facility could abstract all these and have one function call as an interface to outside.

schedutron commented 6 years ago

Can I work on this?