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/08/03 01:56:13 UTC
[GitHub] [arrow-rs] HaoYang670 opened a new pull request, #2289: Mark `BinaryArray::get_data_type` and `StringArray::get_data_type` as `const` functions
HaoYang670 opened a new pull request, #2289:
URL: https://github.com/apache/arrow-rs/pull/2289
Signed-off-by: remzi <13...@gmail.com>
# Which issue does this PR close?
Related to #2274.
# Rationale for this change
More constant evaluation is better.
# What changes are included in this PR?
# Are there any user-facing changes?
No.
<!---
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 #2289: Replace the `fn get_data_type` by `const DATA_TYPE` in BinaryArray and StringArray
Posted by GitBox <gi...@apache.org>.
ursabot commented on PR #2289:
URL: https://github.com/apache/arrow-rs/pull/2289#issuecomment-1203770831
Benchmark runs are scheduled for baseline = 299908ee0c12edb1e720ed9a0465cb7af8352cb3 and contender = 1cc85635bd921ccd1e84b04ab0b8a00e100c26b3. 1cc85635bd921ccd1e84b04ab0b8a00e100c26b3 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/b7281a35fc064650828888587dcd88c8...575b50ce8862451d985cecdeca746c83/)
[Skipped :warning: Benchmarking of arrow-rs-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/1cca6a8fc7704324a3e2464034e75a3b...a199b74634fd4b21917c25d9e9d3f458/)
[Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/c2598aab4a014a06ad33c5e8f7aaba5e...5f5987d899ce4c08aa361b993e299399/)
[Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/66a4aa43a8a34fbe88cd85b943eee81e...7329bbe7b83d4b6eaf35697c4072e02c/)
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 #2289: Replace the `fn get_data_type` by `const DATA_TYPE` in BinaryArray and StringArray
Posted by GitBox <gi...@apache.org>.
tustvold merged PR #2289:
URL: https://github.com/apache/arrow-rs/pull/2289
--
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] HaoYang670 commented on pull request #2289: Mark `BinaryArray::get_data_type` and `StringArray::get_data_type` as `const` values
Posted by GitBox <gi...@apache.org>.
HaoYang670 commented on PR #2289:
URL: https://github.com/apache/arrow-rs/pull/2289#issuecomment-1203460932
Please add the `API_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] alamb commented on a diff in pull request #2289: Replace the `fn get_data_type` by `const DATA_TYPE` in BinaryArray and StringArray
Posted by GitBox <gi...@apache.org>.
alamb commented on code in PR #2289:
URL: https://github.com/apache/arrow-rs/pull/2289#discussion_r936502397
##########
arrow/src/array/array_binary.rs:
##########
@@ -37,15 +37,17 @@ pub struct GenericBinaryArray<OffsetSize: OffsetSizeTrait> {
}
impl<OffsetSize: OffsetSizeTrait> GenericBinaryArray<OffsetSize> {
+ /// Data type of the array.
+ pub const DATA_TYPE: DataType = if OffsetSize::IS_LARGE {
+ DataType::LargeBinary
+ } else {
+ DataType::Binary
+ };
+
/// Get the data type of the array.
- // Declare this function as `pub const fn` after
- // https://github.com/rust-lang/rust/issues/93706 is merged.
- pub fn get_data_type() -> DataType {
- if OffsetSize::IS_LARGE {
- DataType::LargeBinary
- } else {
- DataType::Binary
- }
+ #[deprecated(note = "please use `Self::DATA_TYPE` instead")]
Review Comment:
💯 for deprecation
--
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