Skip to content

Commit

Permalink
apacheGH-34722: [C++][Parquet] Minor: Update wording of Parquet NextP…
Browse files Browse the repository at this point in the history
…age (apache#35368)

### Rationale for this change

This change update wording of Parquet `NextPage`. It will reuse same decompression/decrypt buffer internal. So, use should attension it syntax.

### What changes are included in this PR?

No code change, just add some comments.

### Are these changes tested?

No need

### Are there any user-facing changes?

No.

* Closes: apache#34722

Lead-authored-by: mwish <maplewish117@gmail.com>
Co-authored-by: mwish <1506118561@qq.com>
Co-authored-by: Will Jones <willjones127@gmail.com>
Signed-off-by: Will Jones <willjones127@gmail.com>
  • Loading branch information
3 people authored and rtpsw committed May 16, 2023
1 parent c1404de commit b5e85f7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cpp/src/arrow/buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ class ARROW_EXPORT Buffer {

Buffer(const uint8_t* data, int64_t size, std::shared_ptr<MemoryManager> mm,
std::shared_ptr<Buffer> parent = NULLPTR)
: is_mutable_(false), data_(data), size_(size), capacity_(size), parent_(parent) {
: is_mutable_(false),
data_(data),
size_(size),
capacity_(size),
parent_(std::move(parent)) {
SetMemoryManager(std::move(mm));
}

Expand Down
5 changes: 5 additions & 0 deletions cpp/src/parquet/column_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,11 @@ class SerializedPageReader : public PageReader {
}

// Implement the PageReader interface
//
// The returned Page contains references that aren't guaranteed to live
// beyond the next call to NextPage(). SerializedPageReader reuses the
// decryption and decompression buffers internally, so if NextPage() is
// called then the content of previous page might be invalidated.
std::shared_ptr<Page> NextPage() override;

void set_max_page_header_size(uint32_t size) override { max_page_header_size_ = size; }
Expand Down
3 changes: 3 additions & 0 deletions cpp/src/parquet/column_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ class PARQUET_EXPORT PageReader {

// @returns: shared_ptr<Page>(nullptr) on EOS, std::shared_ptr<Page>
// containing new Page otherwise
//
// The returned Page may contain references that aren't guaranteed to live
// beyond the next call to NextPage().
virtual std::shared_ptr<Page> NextPage() = 0;

virtual void set_max_page_header_size(uint32_t size) = 0;
Expand Down

0 comments on commit b5e85f7

Please sign in to comment.