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

ORC-1730: [C++] Add finishEncode support for the encoder #1956

Closed
wants to merge 3 commits into from

Conversation

luffy-zh
Copy link
Contributor

What changes were proposed in this pull request?

Add finishEncode() to the RLE encoder and implement finishStream() in BufferedOutputStream / compressionStream.

Why are the changes needed?

We expect to finish encoding when the compression block is aligned with the row group boundary.

How was this patch tested?

Uts in testRleEncode() can cover this patch.

Was this patch authored or co-authored using generative AI tooling?

No

@github-actions github-actions bot added the CPP label Jun 12, 2024
@@ -63,6 +63,11 @@ namespace orc {

virtual void suppress() override;

/**
* Finish encoding the stream.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The statement is a little bit confusing.

Copy link
Contributor Author

@luffy-zh luffy-zh Jun 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More comments are added to finishEncode function.

c++/src/RLEv1.cc Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can rewrite RleEncoderV1::flush() with finishEncode() to make it clearer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completed the refactoring of RleEncoderV1::flush().

Copy link
Contributor

@ffacs ffacs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@ffacs ffacs closed this in 8003801 Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants