You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/23 14:46:34 UTC

[GitHub] [arrow-rs] tustvold opened a new pull request, #3171: Return slice from GenericByteArray::value_data

tustvold opened a new pull request, #3171:
URL: https://github.com/apache/arrow-rs/pull/3171

   # Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   Closes #.
   
   # Rationale for this change
    
   <!--
   Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
   Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
   -->
   
   This not only avoids unnecessary clones, but is consistent with the general approach of the arrays abstracting away the buffer details.
   
   # What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   # Are there any user-facing changes?
   
   
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!---
   If there are any breaking changes to public APIs, please add the `breaking change` label.
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-rs] ursabot commented on pull request #3171: Return slice from GenericByteArray::value_data

Posted by GitBox <gi...@apache.org>.
ursabot commented on PR #3171:
URL: https://github.com/apache/arrow-rs/pull/3171#issuecomment-1325523274

   Benchmark runs are scheduled for baseline = 78ab0ef3f6f422fd4b79a29504f0274220aaf74b and contender = f749e1d9f19a5da9249b8e1d2429b10acde97805. f749e1d9f19a5da9249b8e1d2429b10acde97805 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
   Conbench compare runs links:
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ec2-t3-xlarge-us-east-2] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/589f3b4d43be48f786d9e0baad93fe95...1848eea8972c49c2bd4c7d81d81d1a1e/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/c7c414319cab4fa3b18de78208373d26...df560e7794d64c3eaddca1ffbbc8a04b/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/53339077c1bb42bdbab037c22baaae86...9396dc7146d74fec9410281f56a57d70/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/37b0ea2e9b0143f6be25c7a2529d935a...dc566d5e8e6b40a085e82e18b5ddb0b2/)
   Buildkite builds:
   Supported benchmarks:
   ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
   test-mac-arm: Supported benchmark langs: C++, Python, R
   ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
   ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-rs] tustvold merged pull request #3171: Return slice from GenericByteArray::value_data

Posted by GitBox <gi...@apache.org>.
tustvold merged PR #3171:
URL: https://github.com/apache/arrow-rs/pull/3171


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-rs] alamb commented on a diff in pull request #3171: Return slice from GenericByteArray::value_data

Posted by GitBox <gi...@apache.org>.
alamb commented on code in PR #3171:
URL: https://github.com/apache/arrow-rs/pull/3171#discussion_r1030735481


##########
arrow-array/src/array/byte_array.rs:
##########
@@ -55,9 +55,9 @@ impl<T: ByteArrayType> GenericByteArray<T> {
         offsets[i + 1] - offsets[i]
     }
 
-    /// Returns a clone of the value data buffer
-    pub fn value_data(&self) -> Buffer {
-        self.data.buffers()[1].clone()
+    /// Returns the raw value data

Review Comment:
   I also double checked that it is possible to get the buffers (via ArrayData) directly if someone needs access. 👍 
   
   ```rust
   impl<T: ByteArrayType> From<GenericByteArray<T>> for ArrayData {
       fn from(array: GenericByteArray<T>) -> Self {
           array.data
       }
   }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org