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

Return Structured ColumnCloseResult from GenericColumnWriter::close #2465

Closed
tustvold opened this issue Aug 16, 2022 · 0 comments · Fixed by #2466
Closed

Return Structured ColumnCloseResult from GenericColumnWriter::close #2465

tustvold opened this issue Aug 16, 2022 · 0 comments · Fixed by #2466
Labels
enhancement Any new improvement worthy of a entry in the changelog parquet Changes to the parquet crate

Comments

@tustvold
Copy link
Contributor

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

ColumnCloseResult is currently defined as

type ColumnCloseResult = (
    u64,
    u64,
    ColumnChunkMetaData,
    Option<ColumnIndex>,
    Option<OffsetIndex>,
);

Not only is this type alias not public, but it isn't immediately apparent what fields are which.

Describe the solution you'd like

/// Metadata returned by [`GenericColumnWriter::close`]
#[derive(Debug, Clone)]
pub struct ColumnCloseResult {
    /// The total number of bytes written
    pub bytes_written: u64,
    /// The total number of rows written
    pub rows_written: u64,
    /// Metadata for this column chunk
    pub metadata: ColumnChunkMetaData,
    /// Optional column index, for filtering
    pub column_index: Option<ColumnIndex>,
    /// Optional offset index, identifying page locations
    pub offset_index: Option<OffsetIndex>,
}

Describe alternatives you've considered

Additional context

@tustvold tustvold added the enhancement Any new improvement worthy of a entry in the changelog label Aug 16, 2022
tustvold added a commit to tustvold/arrow-rs that referenced this issue Aug 16, 2022
@alamb alamb added the parquet Changes to the parquet crate label Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Any new improvement worthy of a entry in the changelog parquet Changes to the parquet crate
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants