Skip to content
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

Can we support custom split logic for RollingWriter #256

Open
nooberfsh opened this issue Dec 18, 2023 · 2 comments
Open

Can we support custom split logic for RollingWriter #256

nooberfsh opened this issue Dec 18, 2023 · 2 comments

Comments

@nooberfsh
Copy link
Contributor

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 {
        ...
    }
}
@ZENOTME
Copy link
Contributor

ZENOTME commented Dec 26, 2023

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

@liurenjie1024
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants