Hi, yuxia,

Thanks for starting the discussion.

I wonder what the behavior is when we truncate a table which is used as a
source. Source table and sink table may have different table options.
IMO, the truncate sql should be supported no matter which kind the table is.

Best,
Hang

Shammon FY <zjur...@gmail.com> 于2023年3月23日周四 08:55写道:

> Hi yuxia
>
> Thanks for initiating this discussion.
>
> There are usually two types of data deletion in a production environment:
> one is deleting data directly and the other is moving the data to the trash
> directory which will be deleted periodically by the underlying system.
>
> Can we distinguish between these two operations in the truncate syntax? Or
> support adding options in `with`?
>
> Best,
> Shammon FY
>
>
> On Wed, Mar 22, 2023 at 9:13 PM yuxia <luoyu...@alumni.sjtu.edu.cn> wrote:
>
> > Hi, devs.
> >
> > I'd like to start a discussion about FLIP-302: Support TRUNCATE TABLE
> > statement [1].
> >
> > The TRUNCATE TABLE statement is a SQL command that allows users to
> quickly
> > and efficiently delete all rows from a table without dropping the table
> > itself. This statement is commonly used in data warehouse, where large
> data
> > sets are frequently loaded and unloaded from tables.
> > So, this FLIP is meant to support TRUNCATE TABLE statement. M ore
> exactly,
> > this FLIP will bring Flink the TRUNCATE TABLE syntax and an interface
> with
> > which the coresponding connectors can implement their own logic for
> > truncating table.
> >
> > Looking forwards to your feedback.
> >
> > [1]: [
> >
> https://cwiki.apache.org/confluence/display/FLINK/FLIP-302%3A+Support+TRUNCATE+TABLE+statement
> > |
> >
> https://cwiki.apache.org/confluence/display/FLINK/FLIP-302%3A+Support+TRUNCATE+TABLE+statement
> > ]
> >
> >
> > Best regards,
> > Yuxia
> >
>

Reply via email to