icelake-io/icelake

Can we support custom split logic for `RollingWriter`

Closed this issue · 3 comments

RollingWriter::should_split split arrow writer based some configs which have some limitation, e.g. when user want split the arrow writer after the current row num >= 1000.

Can we provide an API like this:

pub WriteStats {
    current_row_num: usize,
    current_written_size: usize,
}

impl RollingWriterBuilder {
    fn with_split(mut self, split_f: impl Fn(&WriteStats) -> bool) -> Self {
        ...
    }
}

Actually the user can custom their own file writer. But I think that it's a good suggestion. How do you think? @liurenjie1024

It's ok to me to have a pluggable split policy.

Closing for #279