Skip to content

ORC-1459: Mark DataBuffer::size() and DataBuffer::capacity() as const - #1558

Closed
progval wants to merge 1 commit into
apache:mainfrom
progval:DataBuffer-const-accessors
Closed

progval wants to merge 1 commit into
apache:mainfrom
progval:DataBuffer-const-accessors

Conversation

@progval

@progval progval commented Jun 30, 2023

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

These two accessors do not mutate the state, so they can be tagged as const to indicate this into callers.

Why are the changes needed?

I am writing a Rust binding, and the methods not being const give me extra constraints.

How was this patch tested?

make test passes.

@progval
progval force-pushed the DataBuffer-const-accessors branch from e088214 to 672d88b Compare June 30, 2023 12:36

@dongjoon-hyun dongjoon-hyun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for making a PR, @progval . I approved your PR to run CIs.

@dongjoon-hyun dongjoon-hyun changed the title Mark DataBuffer::size() and DataBuffer::capacity() as const ORC-1459: Mark DataBuffer::size() and DataBuffer::capacity() as const Jul 1, 2023
@dongjoon-hyun

Copy link
Copy Markdown
Member

I filed an official Apache ORC JIRA for this PR. Could you enroll to Apache JIRA system and let us know?

@dongjoon-hyun dongjoon-hyun added this to the 2.0.0 milestone Jul 1, 2023

@dongjoon-hyun dongjoon-hyun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1, LGTM.

@dongjoon-hyun

dongjoon-hyun commented Jul 1, 2023 •

Copy link
Copy Markdown
Member

Merged to main branch for Apache ORC 2.0.0.
Welcome to the Apache ORC community, @progval .

If I received your JIRA id information, I'll assign ORC-1459 to you.

@progval

progval commented Jul 1, 2023

Copy link
Copy Markdown
Contributor Author

wgtmac pushed a commit that referenced this pull request Jul 7, 2023
…`const`

### What changes were proposed in this pull request?

These two accessors do not mutate the state, so they can be tagged as `const` to indicate this into callers.

### Why are the changes needed?

Same motivation as #1558: I am writing a Rust binding, and the methods not being `const` give me extra constraints.

### How was this patch tested?

`make test` passes.

Closes #1560 from progval/int128-const-accessors.

Authored-by: Valentin Lorentz <vlorentz@softwareheritage.org>
Signed-off-by: Gang Wu <ustcwg@gmail.com>
cxzl25 pushed a commit to cxzl25/orc that referenced this pull request Jan 11, 2024
…const`

### What changes were proposed in this pull request?

These two accessors do not mutate the state, so they can be tagged as `const` to indicate this into callers.

### Why are the changes needed?

I am writing a Rust binding, and the methods not being `const` give me extra constraints.

### How was this patch tested?

`make test` passes.

Closes apache#1558 from progval/DataBuffer-const-accessors.

Authored-by: Valentin Lorentz <vlorentz@softwareheritage.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
cxzl25 pushed a commit to cxzl25/orc that referenced this pull request Jan 11, 2024
…`const`

### What changes were proposed in this pull request?

These two accessors do not mutate the state, so they can be tagged as `const` to indicate this into callers.

### Why are the changes needed?

Same motivation as apache#1558: I am writing a Rust binding, and the methods not being `const` give me extra constraints.

### How was this patch tested?

`make test` passes.

Closes apache#1560 from progval/int128-const-accessors.

Authored-by: Valentin Lorentz <vlorentz@softwareheritage.org>
Signed-off-by: Gang Wu <ustcwg@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants